J
justme
hi
how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
thanks..
how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
thanks..
justme said:hi
how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
thanks..
justme said:how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
thanks..
Abigail said:justme ([email protected]) wrote on MMMCMLVI September MCMXCIII in
<URL:<> hi
<>
<> how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
<> thanks..
What do you mean by "catching" ctrl-x? Matching with a regex?
Abigail
i want to catch from the keyboard. I have looked at perldoc -q signal
$Interrupted = 0; # to ensure it has a value
$SIG{INT} = sub {
$Interrupted++;
syswrite(STDERR, "ouch\n", 5);
}
Does this example catch Ctrl-x?
Keith Keller said:-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
perldoc -q signal talks about trapping signals, not catching keystrokes.
No, it traps SIGINT, which is commonly sent by ctrl-c. IIRC ctrl-x
doesn't normally send a signal, so you can't trap it this way.
Why don't you describe your goal, rather than trying to describe what
you think you want to do? Why are you so concerned with ctrl-x?
- --keith
- --
(e-mail address removed)-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFA44FhhVcNCxZ5ID8RAgSfAJwOszJpruEcvk6lD6kgMqSVhWotjwCgjq6C
Ro02Dl1lGYWpTt+NrFDzCAE=
=EM95
-----END PGP SIGNATURE-----
actually this is what i want:
A user interface to prompt user to continue or use ctrl-x to return to
previous menu.
eg
"Do you accept? [Yn] or Ctrl-x to return to previous"
When the user press Ctrl-x, it will go back to previous page...
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.