Help for this page
#login 1 ... $conn->login( Passcode => $passw); $conn->close; };
foreach $host ( @hosts ) { my $conn = Net::Telnet::Cisco::IOS->new +(HOST => $host); # connect to the host if ( $conn->login( Name => $username, ... else( $conn->login( Passcode => $passw));