go ahead... be a heretic | |
PerlMonks |
Re: Attempting to open and pass info to MS Telnetby saintmike (Vicar) |
on Aug 08, 2004 at 03:59 UTC ( [id://380991]=note: print w/replies, xml ) | Need Help?? |
I guess what you're intending is this: first establish the connection and then you'd like telnet to hand over control to you in interactive mode.
The problem with your approach is that while you might be able to establish the session, you won't be able to jump into the open session interactively. At the end of your script, the session just gets dropped. If you can't find the file controlling telnet's default settings, I'd probably use Expect for this task . Expect lets you call telnet, waits for its prompt, then lets you send the set localecho command, wait for the prompt again and finally take over the session via Expect's interactive command. There's a Perl module (Expect) for it, but I'm not sure if it works on Windows. You might want to use the original, Tcl-(gack!)-based Expect version.
In Section
Seekers of Perl Wisdom
|
|