Hi All,

Please review following code.
there is no output against the code.
the script runs and prints the starting strings and nothing more.

More over I was missing Net::Telnet module. So I downloaded it from CPAN.
Unzipped it , then I manually copied the Telnet.pm extracted from zip at
path /usr/perl5/5.00503/Net

Any help.

#!/usr/bin/perl -w
#  A TELNET SCRIPT
#
#  REMOTE TELNET FETCH UPTIME
#

#!/usr/bin/perl -w
print "***************************************\n";
print "***** A TELNET Script ******************** \n";
print "***************************************\n\n";
print "TELNET Tunnels in progress, Hold on. \n";

use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die');
$telnet->open('xx.xx.xx.xx');
$telnet->waitfor('/login: $/i');
$telnet->print('root');
$telnet->waitfor('/Password: $/i');
$telnet->print('xxxxxxxxxx');
$telnet->waitfor('/# $/i');
$telnet->print('uname -a');
$output = $telnet->waitfor('/# $/i');
print $output;


-- 
Saqib Rafique
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to