I am new to perl
I want to get password in invisible way
example: Enter the Password..?
**
it may space or any other symbol
while giving the input of the specified string
It should not visible to other even a input entering person
Is there any way to getting input in hidden way in perl
Using System Function with stty command.
print "Enter The Password : ";
system ("stty -echo");
my $password = <STDIN>;
system ("stty echo");
chomp $password;
Recipe 15.10: "Reading Passwords"
Use the CPAN module
Term::ReadKey
, set the input mode tonoecho
, and then useReadLine
:use Term::ReadKey; ReadMode('noecho'); $password = ReadLine(0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With