Hi everybody,
I have a script, where a user can choose between different options (add
user (U), add item (I), search (S)). I want the user to hit either U, I
or S. However, right now, he needs to hit return as well. Is there a way
to get input without hitting return?
I was thinking about a loop:
use strict;
use warnings;
my $input;
while (!$input) {
print "Enter option (A, B, C) \n";
$input=<STDIN>;
}
print $input;
As you can see, a user still needs to hit enter. I'm glad for every hint.
Thanks in advance!
Greg
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/