my ($out, $err, $exit) = $ssh->cmd("perl getEnvs.pl"); print "exit: $exit\n"; print "error: $err\n"; print "output: $out\n";