To capture a command's STDERR and STDOUT together: 1. $output = `cmd 2>&1`; #### perldoc -q stderr