The code below (thanks to Don Carlton)works, however the print "$line\n"; prints a "1" instead of the directory listing. I would like to see the directory listing if possible. I am using the built in win2k telnet server if that matters.
use Net::Telnet;
$user="user";
$pass="password";
$host="testmachine.com";
$dumplog="dump.log";
$inplog="input.log";
$optlog="option.log";
$outlog="output.log";
$matchop='/c:/i';
$telnet = new Net::Telnet(Dump_Log => $dumplog,
Input_log => $inplog,
Option_log => $optlog,
Output_log => $outlog,
Timeout => 4,
Prompt => $matchop);
$telnet->open($host);
$telnet->login($user, $pass);
$line = $telnet->cmd("dir");
print "$line\n";
$telnet->close;
Thank you
Eric
_________________
Eric Logeson
919-680-5679
www.dukece.com
