in reply to Capturing both STDERR and STDOUT without shell redirect
Check out IPC::Run3
Seconded. I've made use of it in several scripts where I want to get a hold of all the bits of output, not mashed together, as well as the return value. Looking at one for a quick sample:
# Way earlier
# Run it
my (@out, @err);
run3 \@cmd, \undef, \@out, \@err or die "run3 failed: $!";
# Return val
my $rval = $? >> 8;
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (575 votes). Check out past polls.