Oh fer the luv of...
everything is doing what I want now,
*except* when a command has a nonzero exit code,
the script can't seem to see that.
Here's a little shell script called "exit_one.csh"
echo "EXIT_ONE"
exit 1
Here's the perl script (perl_pipe.pl) that runs it with an open pipe:
my $pid = open(my $HANDLE2, "exit_one.csh|") or die "failed to open";
while(<$HANDLE2>){
print "line is $_";
}
print "\$\? is '$?'\n";
print "\$\@ is '$@'\n";
Running the perl_pipe.pl generates ths following:
line is EXIT_ONE
$? is '0'
$@ is ''
If I open a pipe on a command that has a nonzero exit status,
where do I check that???
Greg
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm