User input without waiting for enter
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/21
17:33 UTC
Read the original article
Hit count: 229
perl
|user-input
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