Newb to Perl has asked for the wisdom of the Perl Monks concerning the following question:
always returns a "1" to the screen and not something like: Tue Aug 21 2007, 01:36:15, like I would expect. I've seen a net::telnet package specific to the Cisco IOS, but I'm unable to install it at this time (I dont' have permission at this time). Am I missing something or can this not be done? Any insight is appreciated.use Net::Telnet; @data = ''; $tnet = new Net::Telnet(); #Create a new telnet session $tnet->open("$ARGV[0]"); #Telnet to selected device $tnet->login($ARGV[1], $ARGV[2]);#Login to device @data = $tnet->print("show time");#Capture data from command The problem is when I print the data array: print @data;
|
|---|