use Capture::Tiny qw/ capture /;
my ( $stdout, $stderr ) = capture { # your code here };
See also: IO::CaptureOutput.
In reply to Re: capture STDOUT, STDERR to TWO different perl variables
by Your Mother
in thread capture STDOUT, STDERR to TWO different perl variables
by smg1827
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |