in reply to Sending key sequence with Net::Telnet

You don't show any code. I'd think that ->print("\x28") would work.

I'd have used "\c\" to get CTRL-\ more directly but that is a syntax error because the parser code that looks for the closing " doesn't understand the \c\ escape. You can work around this with substr("\c\ ",0,1), but that seems like too much work.

If you wonder what ->break() does, then why don't you just go look for yourself? BTW, it just boils down to $self->print("\xff\xf3").

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Sending key sequence with Net::Telnet
by EyeOpener (Scribe) on Mar 14, 2002 at 21:51 UTC
    Thanks for the reply, Tye!

    I'm making newbie errors all over the place here. As it turns out, the ->break() was working fine. I was misinterpreting what I saw in the input log file. I expected a nice human-readable log file based on the Net::Telnet docs, but instead it's filled with extended-ASCII or otherwise garbled text. I originally thought this was the output of the GUI-based app that's auto-launching, but I think instead this is a problem related to terminal character set or somesuch.

    The actual problem (the ->cmd timeout) was due to my setting the prompt incorrectly. I set it to the default /[%#>] $/, which would match what I see in an interactive telnet session. However, the log file shows that the server is sending something like "a21R39", which I again suspect is a terminal-type issue. For testing, I set the prompt to /./ and it continued past this point.

    BTW, your ->print("\x28") works for a break too. :-) Thanks again. I welcome anyone's thoughts on the prompt issue, but I won't be ticked if I'm ignored. I'll do a little more research before I post on this again.