EyeOpener has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a short script using Net::Telnet (first time with this module). I'm getting the hang of the various methods, but I've hit a snag.
My Unix account auto-launches an application (probably through .login or .profile). In an interactive telnet session, I break out of the application with Ctrl-\ (Control-Backslash) and continue working at a shell prompt. In my Perl script, I can't figure out how to break out of this app.
I've tried the break() method, but this doesn't work. My semi-educated guess is that this is sending a telnet break code, and not the Ctrl-\ the app or shell is looking for. I've also tried isolating the extended ASCII code for this key sequence and sending that via the print() method, but again no dice.
Any thoughts on how I can break out of this app? I'm not all that familiar with Unix, so I welcome all info on what might be happening in the background. Is the Ctrl-\ a standard "break" sequence, or is this app-specific? Is there a way to bypass the launching of this app on login?
If it matters, I'm developing this on ActiveState's Perl on a Win32 box, telnetting to a Unix host. In production, this script will be running on one Unix box, telnetting to another.
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Sending key sequence with Net::Telnet
by tye (Sage) on Mar 14, 2002 at 16:50 UTC | |
by EyeOpener (Scribe) on Mar 14, 2002 at 21:51 UTC |