in reply to qx and STDERR?

There are lots of other options, e.g. System::Command, which let you handle each std stream individually, if you don't have to use qx

There is also Capture::Tiny which will capture your std streams, from manpage:

use Capture::Tiny ':all'; my ($stdout, $stderr, $exit) = capture { qx/ls -al file-does-not-exist/ };

p.s. I leave here just for reference a guide to IO redirection in bash - really cool stuff: http://tldp.org/LDP/abs/html/io-redirection.html