in reply to Re: Capturing both STDOUT, STDERR and exit status
in thread Capturing both STDOUT, STDERR and exit status
Thanks, this is nice and clean. I did make the qx output scalar, otherwise it gives me a list of output lines.
sub executeCommand { my $command = join ' ', @_; ($? >> 8, $_ = qx{$command 2>&1}); } my ($status, $output) = executeCommand ('/bin/ls', '/');
pbeckingham - typist, perishable vertebrate.
In Section
Seekers of Perl Wisdom