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 |