http://www.perlmonks.org?node_id=186540


in reply to How do I capture shell error messages from a remote host?

just a way :

capture STDERR to file and `cat the file`

$stdout = $t->cmd("some_cmd 2> /tmp/error.tmp"); $stderr = $t->cmd("cat /tmp/error.tmp; rm /tmp/error.tmp");
i can't sure it is good answer =(

good luck!