in reply to Capturing stderr

If you're not bothered by mixing STDOUT and STDERR, you can do $output = `$cmd 2>&1`;

Otherwise, take a look at the standard IPC::Open3 module