"be consistent" | |
PerlMonks |
Error management in NET::SSH2by msk_0984 (Friar) |
on Sep 14, 2007 at 14:26 UTC ( [id://639014]=perlquestion: print w/replies, xml ) | Need Help?? |
msk_0984 has asked for the wisdom of the Perl Monks concerning the following question:
Respected Monks, Thanks for your replies which I have recieved from and have helped me a lot to solve my problems and could also learn a lot through this site and from the well experienced monks. Right now I am facing a problem with the error management of NET::SSH2 module. When I give a correct command say "hostname" i get the perfect output, but by mistake I gave it as "hostnam" and executed the program. It did not print any error status some thing when using Net::Telnet it also showed me the error by returning it but here i could not see any error its just blank. Actually I have used threading and tried to connect to multiple systems using NET:SSH2 and executing commands on the remote systems for which I have written a subroutine. But when I have given a wrong command by mistake it did not prompt any error message.
Here is the part of my script where i implemented NET::SSH2 .
Here I got the perfect output for "hostname" . but since I gave a wrong command I didnot get any error message displaying "Command not found". The NET::SSH2 module will it not catch up what ever error generated. OUTPUT
Only the Hostname is being displayed and no information about the "who" command. Thanks Sushil Kumar
Back to
Seekers of Perl Wisdom
|
|