in reply to Re: Capturing both STDOUT, STDERR and exit status
in thread Capturing both STDOUT, STDERR and exit status

(hopefully not being too much of a thread necrophile here) This is an excellent example, which has just saved me from abhorrent temp file hell. One small quibble; the retval line should probably read:
my $retval = $? >> 8;