I want to capture both STDERR and STDOUT for my command execution. I am using Bourne shell and having the below below peace of code in my perl file.
$result = `$command 2>&1`;
I get only STDOUT in $result. $result is empty when there is a error.
Can someone please help on this?