$! returned empty. I could well be using it incorrectly though.my $run_pid = open(RUN, "sub_script.pl $options 2>&1 |") or $sub_fai +led = 1; if (!$sub_failed) { $text .= "Entered if (!\$sub_failed) {\n"; while (<RUN>) { $text .= "Entered while (<RUN>)\n"; chomp; $_ =~ s/^\s*//; $text .= "$_\n"; } close(RUN); if ($? != 0) { $sub_failed = 1; $text = "Open error: $!\n";} } else { $text .= "Failed to open sub_script.pl\n";} print "$text";
In reply to Re^3: Perl open pipe exiting early
by albob
in thread Perl open pipe exiting early
by albob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |