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;
In reply to Re: Ghosted input
by tirwhan
in thread Ghosted input
by monoxide
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |