Code Comments
Programming Forum and web based access to our favorite programming groups.I'd like to get a character from stdin, perform some action, get another character, etc. If I just use read(stdin, 1).., it waits until I finish typ ing a whole line before I can get the first character. How do I deal with this? Aleppos
Post Follow-up to this messageHi, you can use the Term::Inkey module which can be found here: http://search.cpan.org/~razinf/Term...4/Term/InKey.pm #An example using the Inkey module use strict; use warnings; use Term::InKey; my $x=""; while($x ne "q"){ $x = &ReadKey; print "You pressed $x\n"; }
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.