http://www.perlmonks.org?node_id=423523


in reply to CLI must not echo password

Another alternative is IO::Prompt:
use IO::Prompt; $pwd = prompt "enter password: ", -echo=>"";
or, better still, echo the password with stars:
use IO::Prompt; $pwd = prompt "enter password: ", -echo=>"*";

Replies are listed 'Best First'.
Re^2: CLI must not echo password
by PhilHibbs (Hermit) on Jan 20, 2005 at 14:16 UTC
    Ooh, I nearly got excited about that, but it also isn't a standard module and needs Term::ReadKey as well anyway. The code does look cleaner though.