in reply to Reading a password with Term::ReadLine
use Term::ReadKey; ReadMode('noecho'); ReadMode('raw'); my $pass = ''; while (1) { my $c; 1 until defined($c = ReadKey(-1)); last if $c eq "\n"; print "*"; $pass .= $c; } ReadMode('restore'); print "\n[$pass]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reading a password with Term::ReadLine
by spartan (Pilgrim) on May 12, 2004 at 17:48 UTC |