How can I get input without waiting for enter in Perl?

Posted by Hermann Ingjaldsson on Stack Overflow See other posts from Stack Overflow or by Hermann Ingjaldsson
Published on 2010-04-21T17:28:57Z Indexed on 2010/04/22 13:23 UTC
Read the original article Hit count: 396

Filed under:
|

I am trying to make an interactive shell script in Perl.

The only user input I can find is the following:

 $name = <STDIN>;
 print STDOUT "Hello $name\n";

But in this the user must always press enter for the changes to take effect. How can I get the program to proceed immediately after a button has been pressed?

© Stack Overflow or respective owner

Related posts about perl

Related posts about user-input