I get the following error:
Can't locate object method "Select" via package "All" (perhaps you forgot to load "All"?) at script.pl line 29, <$File> line
21.
Main Topics
Browse All TopicsI use one script to pull data from a Cisco router then the second scripts uses the output file of the frist script to output the final file.
I wish to combine these into a single script.
FIRST SCRIPT:
#!/usr/bin/perl
# Use the script as follows C:> PERL script.pl ipaddress > output_file_name
#
use Net::Telnet;
my $MB = 1024 * 1024;
open (FILE,@ARGV[0])|| die "Sorry, I can't seem to find @ARGV[1]. Please check
$my @lines;
the spelling.\n";
print "\n";
while (<FILE>) {
my $ip = $_;
my $t = Net::Telnet->new(Timeout => 240,
Prompt => '/.*#/',
Host => $ip);
my $debug=$ARGV[1];
$t->max_buffer_length(5 * $MB);
$t->login('username','pass
$t->cmd("terminal length 0");
print $ip;
my @lines = $t->cmd("show cable modem docsis device-class | in MTA");
print "\n\n@lines\n";
$t->cmd("");
$t->close;
}
SECOND SCRIPT
perl -ane "print \"clear cable modem $F[0] reset\n\"" mtas > newfile.txt
BTW....running this on Windows
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Adam314Posted on 2008-10-14 at 08:38:02ID: 22712347
Select allOpen in new window