I use a good bit of Net::Telnet on a variety of UNIX servers - the only issue I've had is when the prompts were different. And yes, it's a good idea to turn on the log for input and output.
-----Original Message----- From: Moulder, Glen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 9:45 PM To: Lillianne Dykstra Cc: perl-win32-users Subject: RE: Telnet on Win32 Hi, I've been doing a lot of work on my LAN lately, trying to establish connections between my PC and the server and conduct operations on the server. I beat my head on Net::Telnet (in an environment similar to yours) for over a week and finally gave up, opting for Net::FTP instead which is much friendlier. Seems that it's not the prompt that Telnet doesn't like, it's all the weird line separators in the output (look at the dump of output_log to see what I mean). Caveat: I'm having a problem with running commands through Net::FTP->quot() also, so beware (see my post just prior to yours). Glen > -----Original Message----- > From: Lillianne Dykstra [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 4:38 PM > To: '[EMAIL PROTECTED]' > Subject: Telnet on Win32 > > > Hi All! > > I am having problems executing a simple telnet session on > Windows 2000. It appears that it does not like my prompt. > It times-out and then objects to line 15 of the code (the > login line). Can you advise why this is not working? > > $login="ldykstra"; > $pass="password"; > $host="200.1.2.20"; > > use Net::Telnet; > $telnet = new Net::Telnet > ( > Timeout => 10, > Prompt => '/[\$%#>] $/' > ); > $telnet->open($host); > > $telnet->login($login,$pass); > @listing= $telnet->cmd("ls"); > print "@listing"; > print "\n"; > $telnet->close; > > Lillianne Dykstra > Information Technology Manager > North Coast Medical > 18305 Sutter Blvd. Morgan Hill, CA 95037 > 408-776-5000 x157 > 1-800-821-9319 > [EMAIL PROTECTED] > > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
