
bkimelman
Novice
Jul 28, 2011, 9:17 AM
Post #1 of 3
(5780 views)
|
How can I get more info on a Net::Telnet connection error
|
Can't Post
|
|
Hello, I am having an issue with a Perl CGI script at the office. We are running Perl 5.8.8 Here is the relevant part of my CGI script $status = 0; $prompt = '/#/'; $telnet = Net::Telnet->new(Host => $switch_ip_address, Timeout => 5, Prompt => $prompt,Errmode => "return", Input_log => "$logfile" ); unless ( defined $telnet ) { report_switch_error($switch_ip_address,"can't establish a connection"); return -1; } # UNLESS $telnet->errmode(\&telnet_error_handler); For the particular switch I am attempting to connect to the connect6ion fails. Since this results in an undefined value being assigned to $telnet I can't use $telnet->errmsg() to get more info. Is there some way I can get more error details ? Thanks in advance for your assistance.
|