in reply to Re^3: Can't get data from cisco router/switch when telnetting in via perl script.
in thread Can't get data from cisco router/switch when telnetting in via perl script.
Here is the output of the script: data is 19:21:11.575 UTC Tue Aug 21 2007 I hope you can add the Net::Telnet::Cisco module in the future. It greatly simplifies life if you have a bunch of these to keep track of.use Net::Telnet; # use the telnet module my $host = '3750g'; my $t = new Net::Telnet (Timeout => 10, Prompt => '/3750G\>/', ); $t->open($host); $t->login($user,$pass); @data = $t->cmd("show clock"); print "data is @data"; $t->close;
|
|---|