in reply to Ghosted input
use strict; use warnings; use Term::ReadKey; my $hint = "I'm not going to tell you! You knew it already"; print "Username: "; chomp(my $user = <STDIN>); # validate $user print "Password: "; ReadMode 'noecho'; chomp(my $pass = <STDIN>); ReadMode 'normal'; # validate $pass print "\nYou said: username=$user, password=($hint)\n";
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ghosted input
by monoxide (Beadle) on Jun 15, 2007 at 04:34 UTC |