$stdout = $t->cmd("some_cmd 2> /tmp/error.tmp"); $stderr = $t->cmd("cat /tmp/error.tmp; rm /tmp/error.tmp");