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


in reply to How do I make password prompts not echo back the user?

Use Term::Readkey. It is more portable than the unix-only solution of stty. Here's a quick example (untested):
use Term::ReadKey; print "Type your password:"; ReadMode('noecho'); # don't echo chomp(my $password = <STDIN>); ReadMode(0); # back to normal

Cheers,
Shendal