To capture STDERR with backquotes, use:
$output = `cmd 2>&1 1>/dev/null`;If you want both, omit redirecting STDOUT to /dev/null:
$output = `cmd 2>&1`;However, it is generally safer to use open3.
In reply to Re^2: Problems with open3
by RonW
in thread Problems with open3
by stdietz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |