J
Joe
I wish to have an easy way to capture STDERR and STDOUT from a command line(system("$cmd") or `$cmd`). The methods give on perl FAQ list is complicated (http://perldoc.perl.org/perlfaq8.html#How-can-I-capture-STDERR-from-an-external-command). However the "Net::SSH:erl" module has a very nice way to capture them like in:
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
I wonder is there a function/module to allow something like:
my($stdout, $stderr, $exit) = `$cmd`;
I did search but fail to find so far. Any advice would be appreciated.
joe
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
I wonder is there a function/module to allow something like:
my($stdout, $stderr, $exit) = `$cmd`;
I did search but fail to find so far. Any advice would be appreciated.
joe