|
Posted by jason.wolford on March 17, 2006, 7:10 pm
Please log in for more thread options
I'm trying to telnet to multiple system IP address that I'm loading
from a file. However, if one of the telnet connections fails, the
scripts stops. I want it to continue trying to telnet to the rest of
the devices in the list even if connections fail. I'm fairly new at
this and any assistance would be helpful.
while (my $ip = <FILE>){
my $telnet = Net::Telnet->new(Host=>"$ip", Port=>'23')
$telnet->login("user","password");
$telnet->print('en');
$telnet->print('password');
$telnet->print("$set_serv_ip");
my @lines = $telnet->print("restart all");
print OUT @lines;
problem connecting to "10.1.2.127
", port 23: Unknown error at C:\server-change.pl line 53
|