in reply to getting output from backticks

Re-direct the standard error output and read that:

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.