if ($exit_status != 0) { print("-F-Job completed abnormally.(status = $exit_status)\n"); } else { print("-I-Job completed successfully.\n"); } #### $command = "program_to_run $opt{c} -f test"; # print "$command\n"; open(RUN, "$command 2>&1|"); while () { print "$_\n"; next; } close(RUN); exit 0;