Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

waitfor() ctrl+a and ctrl+c in net::telnet

by TheZach (Initiate)
on Feb 17, 2013 at 21:13 UTC ( #1019215=perlquestion: print w/ replies, xml ) Need Help??
TheZach has asked for the wisdom of the Perl Monks concerning the following question:

I would like to know how I can wait for the control charectors Ctrl+A and Ctrl+C with net::telnet waitfor()

Comment on waitfor() ctrl+a and ctrl+c in net::telnet
Replies are listed 'Best First'.
Re: waitfor() ctrl+a and ctrl+c in net::telnet
by Illuminatus (Curate) on Feb 17, 2013 at 23:10 UTC
    waitfor takes a perl regex as a parameter. ctrl chars can be matched using either their hex values (ie \x01 for ctrl-A) or as ctrl chars themselves (ie using \cA for ctrl-A). This is all explained in perlreref. Have you already tried this?

    fnord

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1019215]
Approved by muba
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-07-29 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls