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;
In reply to Re: Trapping for Control^Z
by dakkar
in thread Trapping for Control^Z
by Kri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |