Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Trapping for Control^Z

by dakkar (Hermit)
on Nov 18, 2002 at 22:12 UTC ( [id://213951]=note: print w/replies, xml ) Need Help??


in reply to Trapping for Control^Z

Keep in mind that you are not trapping ^C or ^Z: you are trapping the signal that the terminal is sending to your process.

If you really want to get the keys, try:

#!/usr/bin/perl -w use Term::ReadKey; ReadMode 4; while (($key=ReadKey(0)) ne 'Q') { print "Got key ",ord($key),"\n"; } ReadMode 0;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://213951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found