my $errFile = 'mount.err'; my $stdout = qx("mount $device $dir 2>&1"); if ($?) { printf "mount error code ", $?>>8, " $stdout"; }
The 2>&1 directs the stderr to the same place as the stdout.
In reply to Re: getting output from backticks
by bikeNomad
in thread getting output from backticks
by melguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |