Why it is not stable?

"Attiah, Ibrahim A" <[email protected]>
Newsgroups gmane.comp.web.perlfect-search
Message-ID <[email protected]>
The below code worked fine and gave the desired result many time but
suddenly started to return the same earlier error message "timed-out
waiting for command prompt at perliaa5b.pl line 8". I used to get this
message before 
Until I got a help from [email protected] to add the Prompt setting to
the code as it appear below. Please help. Thank you.


use Net::Telnet;
my $Telnet = new Net::Telnet; 
my $InHandle = $Telnet->input_log("inlog.txt"); 
my $OutHandle = $Telnet->output_log("outlog.txt"); 
my $prmpt = '/[\w().-]*[\$#>:.]\s?(?:\(enable\))?\s*$/'; 
$telnet = new Net::Telnet (Timeout=>40, Prompt => $prmpt,
Errmode=>'die'); $telnet->open('xx.xx.xxx.xxx');
$telnet->login('user','user'); @lines= $telnet->cmd("Networking"); 
@lines= $telnet->cmd("IP");
@lines= $telnet->cmd("ipmac");
print STDOUT @lines;
$telnet->close;


_______________________________________________
perlfect-search mailing list
[email protected]
To unsubscribe, set other personal options or view the list archives please visit:
http://perlfect.com/mailman/listinfo/perlfect-search

lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.