Is there a way to get an external process's output *and* return value? I have a program that opens a pipe to 'make', process all the input, and then checks the return value when the loop ends (pipe is broken/closed):

open MAKE, "make |" or die "Can't open MAKE pipe";

while(<MAKE>) {
  # Process input
}
if($make_return_value) {
  # An error occured with 'make'
}

How do I get that return value?

--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to