Folks
I sent a message earlier asking for help on using Net::Telnet. I thought,
I'd include my coe in a message. I would like the telnet session to stay
open till the user decides otherwise. Any help is always appreciated.
Thanks
Vrunda
MY CODE AT PRESENT:
#!/usr/bin/perl
use CGI qw/:standard/;
use Net::Telnet ();
# use Term::Readkey();
$q = new CGI;
$user = $q->param('user');
$pass = $q->param('pass');
$ip = '...';
$t=new Net::Telnet(Prompt=>'/\[.*\]\$ $/');
$t->open($ip);
$t->login($user, $pass);
@files=$t->cmd("ls -alg");
print "Content-type:text/html\n\n";
print "<html>";
print "<ol>";
foreach $file(@files)
{print "<li>$file\n";}
print "</ol>";
print "</html>";
$t->close;