dimishome has asked for the wisdom of the Perl Monks concerning the following question:
I have also tried with:#! /usr/bin/perl use strict; use warnings; use Net::Telnet; use Data::Dumper; my $t = new Net::Telnet (Timeout => 10, Prompt => '/>/'); $t->open("192.168.3.35"); $t->print(""); $t->login('user','****'); $t->print('3'); $t->print('1'); my @lines = $t->print('2'); print Dumper @lines; exit(0);
I have also attempted the $t->waitfor('/string/') option but all return the following error:#! /usr/bin/perl use strict; use warnings; use Net::Telnet; use Data::Dumper; my $t = new Net::Telnet (Timeout => 10, Prompt => '/>/'); $t->open("192.168.3.35"); $t->login('user','****'); $t->print('3'); $t->print('1'); my @lines = $t->print('2'); print Dumper @lines; exit(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet issue
by Eliya (Vicar) on Feb 24, 2011 at 18:51 UTC | |
by dimishome (Beadle) on Feb 24, 2011 at 20:03 UTC | |
by Eliya (Vicar) on Feb 24, 2011 at 22:04 UTC | |
by dimishome (Beadle) on Feb 24, 2011 at 22:19 UTC | |
|
Re: Net::Telnet issue
by roboticus (Chancellor) on Feb 24, 2011 at 18:57 UTC | |
by dimishome (Beadle) on Feb 24, 2011 at 20:09 UTC | |
|
Re: Net::Telnet issue
by frodonl (Novice) on Feb 24, 2011 at 19:03 UTC |