fork download
  1. #!/usr/bin/perl
  2. open(TL,">test.txt");
  3. print TL ("error");
  4. close (TL);
  5. open(RL,"test.txt");
  6. $test = <RL>;
  7. $error = grep(/error/,$test);
  8. printf ("ERROR %d ",$error);
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
ERROR 0