in reply to CLI must not echo password

Check out Term::ReadKey Readmode 2

Replies are listed 'Best First'.
Re^2: CLI must not echo password
by PhilHibbs (Hermit) on Jan 20, 2005 at 13:55 UTC
    Term::ReadKey is the only solution that I could get to work. It is unfortunate that it needs a non-standard module. Here's my code:
    use Term::ReadKey; print 'Enter Username: '; my $user = <STDIN>; chomp $user; print "Enter Password: "; ReadMode ('noecho'); my $pass = <STDIN>; chomp $pass; ReadMode ('restore'); print "\n";
    Update: link to kobesearch since search.cpan is down