[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: Returing exit status in perl
From:       207.171.7.86
Date:       2010-09-27 5:06:54
Message-ID: 747672d4-230c-425c-aec4-a85a847cf05b () t5g2000prd ! googlegroups ! com
[Download RAW message or body]

On Sep 23, 9:42 pm, soorajspadmanab...@gmail.com (Sooraj S) wrote:
> p2
> ===
> use Net::Telnet;
>
> $t = new Net::Telnet();
> $t->open("machine");
> $t->login("user","paswd");
> $t->cmd("p3 $flag");
> $t->close();

Since you are using the Net::Telnet Module.. it would have been better
if you used the error message method in that module
"$error = $t->errmsg;"

Please check if thats works fine for you..

Please read throught the documentation of the CPAN modules that you
are using so as to avoid breaking your head when its already been part
of the module.

http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm#METHODS
This might help you with trapping the error message for sure..


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic