Net::Telnet works wonders.
If you really want to use a system call, just pipe the commands from a flat text file. Something like:
 
system ("telnet $host < in.txt");
 
 
----- Original Message -----
Sent: Tuesday, July 26, 2005 8:43 AM
Subject: Telnet session from a Perl script?

Hi all...
 
I need to have a Perl script that runs a telnet session from a Unix server to a Windows server to issue a shutdown /r command to reboot the Windows server.  Obviously, system("telnet $host"); would get the session going, but how would one handle the interactive (user, password, commands) part of the session?
 
TIA!
Eric
 


_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to