in reply to Ghosted input
The easiest way I know is using IO::Prompt
use IO::Prompt; my $passwd = prompt("Enter password: ", -e => ""); print $passwd;
Note: IO::Prompt autochomps the input for you, so no need to do that manually. Similarly, the popular method of printing a star for each typed character:
use IO::Prompt; my $passwd = prompt("Enter password: ", -e => "*"); print $passwd;
|
|---|