varalaxmibbnl has asked for the wisdom of the Perl Monks concerning the following question:
if i run this code i get (Can't locate Net/Telnet.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at t1.pl line 2. BEGIN failed--compilation aborted at t1.pl line 2. ) this error plz help me out to solve this problem...
#!/usr/bin/perl use Net::Telnet; $host = "xxx.xxx.xxx.xxx"; $port = "23"; $uid = "xxxxx"; $pwd = "xxxx"; open $inputLog, ">in.log"; $box = new Net::Telnet(); $box->open( Host => $host, Port => $port, ); $iLog = $box->input_log($inputLog); $flag = $box->login( Name => $uid, Password => $pwd, ); $box->print("show log"); $box->waitfor('/# $/i'); $box->close; exit
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use of telnet in perl
by rminner (Chaplain) on Sep 13, 2013 at 07:49 UTC | |
by varalaxmibbnl (Acolyte) on Sep 13, 2013 at 08:10 UTC | |
by rminner (Chaplain) on Sep 13, 2013 at 08:15 UTC | |
by varalaxmibbnl (Acolyte) on Sep 13, 2013 at 08:31 UTC | |
|
Re: use of telnet in perl
by ansh batra (Friar) on Sep 13, 2013 at 08:26 UTC | |
by Happy-the-monk (Canon) on Sep 13, 2013 at 08:54 UTC | |
by ansh batra (Friar) on Sep 13, 2013 at 09:03 UTC |