Link to home
Start Free TrialLog in
Avatar of zmanz
zmanz

asked on

Don't want to see user input

I want to prompt the user for input
and assign the user input to a scalar
variable but I don't want the user input
to be displayed as it is being typed.
How do I accomplish this ? Thanks.
Avatar of maneshr
maneshr

#!/usr/local/bin/perl

system "stty -echo";
print "Enter :";
chomp($in=<STDIN>);
system "stty echo";

This solution is provided in the Programming PERL book
ASKER CERTIFIED SOLUTION
Avatar of dda
dda
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial