go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm sure I'm doing something silly OR maybe it's my terminal emulator, though I'm using standard putty. I'm real stumped and am hoping someone can spot my problem...
The attached piece of code simply uses ReadKey to do single char I/O and echo its binary character value.
When there's input, I print ">>> GOT INPUT". Then I read it and print its value. If I type 8900098 the following is what I see:
root@poker collectl# ./sht.pl >>> GOT INPUT INPUT: 56 >>> GOT INPUT INPUT: 57 >>> GOT INPUT >>> GOT INPUT >>> GOT INPUT >>> GOT INPUT INPUT: 57 >>> GOT INPUT INPUT: 56 so what happened to the echos of the '0's? Here's the code that does it:
can_read() says there's something to be read on STDIN but ReadKey isn't see anything. And what's so special about '0'? Isn't it just another key? Any and all help will be greatly appreciated. -mark In reply to ReadKey can't see 0 key... by markseger
|
|