laziness, impatience, and hubris | |
PerlMonks |
Re: how to get back a exit status using Net::Telnetby belden (Friar) |
on Jan 18, 2005 at 00:31 UTC ( [id://422854]=note: print w/replies, xml ) | Need Help?? |
If you're logging in to a Unix(-like) machine, you can ask the shell the exit status of your last command. If you are using csh, then you'll need to echo $status. If it's bash, ksh, or sh, then echo $?. If those don't work, then you can always read the man page for your shell to find out how to get this info from your shell. If you are logging in to a Windows machine via telnet, then you may need to make your remote program print "exiting status 2" just before exiting.
In Section
Seekers of Perl Wisdom
|
|