qx/STRING/ ... To capture a command's STDERR and STDOUT together: $output = `cmd 2>&1`;