Austad, Jay wrote:

> So in perl, how do I read user entered input in character by character and
> have it do something when a particular key is pressed.  Say I want the
> program to print "You pressed 5!" when I press the number 5.  So I type:
> 12345
> 
> When the first numbers are entered, nothing happens, but as soon as I press
> 5, the program prints it's output and dies.  When I tried using a while
> (<STDIN>) loop, it didn't seem to read character by character but rather
> only evaluated all of them after I pressed enter.

I haven't used this personally, but I bet that Term::Readkey might help 
you out a bit...

http://www.cpan.org/modules/by-module/Term/TermReadKey-2.21.readme

-Erik


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list