use Net::Telnet::Cisco; for ($i = 1; $i <= 254; $i++){ $device = "172.16.$i.251"; my $session = Net::Telnet::Cisco->new(Host => "$device", Input_log => "perllogrouter/router$i.log",); eval { $session->login('admin', 'admin') or die "Could not connect +to $device" }; if ( $@ ){ # log here #; next } #some command $session->cmd ("show running-config "); $session->close;
In reply to Re: Cisco Telnet
by ~~David~~
in thread Cisco Telnet
by mvip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |