fork download
  1. int $err;
  2. open (TL,">test.txt");
  3. print TL ("error");
  4. close (TL);
  5. $err = "grep error test.txt |wc ";
  6. printf ("VALUE %d ",$err);
  7. if($err != 0){
  8. print ("FAILED");
  9. }
  10. else
  11. {
  12. print ("PASSED");
  13. }
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
VALUE 0 PASSED