IO::CaptureOutput is another way.
use IO::CaptureOutput qw/capture_exec/; my ($stdout, $stderr) = capture_exec( 'command', 'with', 'args' );
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^2: Capturing STDERR using IO::Handle
by xdg
in thread Capturing STDERR using IO::Handle
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |