Possible Duplicate:
How do you capture stderr, stdout, and the exit code all at once, in Perl?
Capturing the output of STDERR while piping STDOUT to a file
I am using the following piece of code to execute a process:
open( my $proch, "-|", $command, @arguments );
Unfortunately, I will just read the stdout. But I'd like to read the stderr as well.
Stderr redirection leads to the following error:
open( my $proch, "2>&1 -|", $command, @arguments );
>>> Unknown open() mode '2>&1 -|' at file.pl line 289
How can I forward stderr to stdout?