#!/usr/bin/perl no strict; #### Define Library Locations ### #use lib '/root/Net-Telnet-3.03/blib/lib/Net/';use lib '/root/Net-Telnet-Cisco-1.10/blib/lib/'; #### Define Modules to use #### use Net::Telnet::Cisco; #### Create Telnet Connection to Device#### my $telnet = Net::Telnet::Cisco->new(Host=>'1.2.3.4 2005', Timeout=>2, Errmode=>'die'); $telnet->waitfor('/Username:/') or die('FAILED'); $telnet->print('xxxx'); $telnet->waitfor('/Password:/') or die('FAILED'); $telnet->print('xxxx'); #$telnet->send_wakeup('connect'); $telnet->waitfor('/PROMPT>/'); @output = $telnet->cmd('show ver'); print @output;