I need to take input from the user (on the terminal window of a Win32 machine) and based on the occurrence of one particular character, I have to operate on the already entered text (before the occurrence of the character). For that, every single keystroke will need to be monitored.
I used Term::ReadKey with success, but what bothers me is that I have to use it constantly in a "while" loop(to monitor the keystrokes) -- and when that happens the CPU usage is almost 100 percent. I do not think that is desirable.
Is there any other way?
In reply to Reading keys by Truman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |