Hi all,
I was wondering if you could help out with this problem that I am having.
What I am trying to do is detect keyboard input in a while loop without
halting/pausing the loop until the key is pressed (without hitting return).
I looked at serveral faq's on the net and installed the cspan readkey module
and neither seems to work most likey its me since I am getting frustrated.
but anyway here's a sample code.
while (1) {
if (keypress) {
print "you've pressed: $key\n";
}
else {
print"Continuing to loop...\n";
sleep 1; # delay the loop incase you need to control-c out.
}
}
TIA!
Scott Shaw