Keep It Simple, Stupid | |
PerlMonks |
Re: is ther any way to get only one char from stdinby Caillte (Friar) |
on Mar 12, 2001 at 06:22 UTC ( [id://63717]=note: print w/replies, xml ) | Need Help?? |
Another way is:
I've tested this out on linux and it works fine. Any reason why it wouldnt work on other platforms? Editor: The problem with this method is that the sysread will hang until the user presses the RETURN key (so if the user really only enters one character and it isn't RETURN, then the program will just "hang").
In Section
Seekers of Perl Wisdom
|
|