Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How can a script use a password without making the password visible?

by Discipulus (Abbot)
on Mar 01, 2017 at 11:56 UTC ( #1183265=note: print w/replies, xml ) Need Help??


in reply to How can a script use a password without making the password visible?

hello Cody Fendant

I'd go with the last option by hippo above, but to be more professional you can add Term::ReadKey's ReadMode to hide what was typed.

use Term::ReadKey; print "password please:\n"; ReadMode 'noecho'; my $password = ReadLine 0; chomp $password; ReadMode 'normal';

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1183265]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2019-04-18 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (103 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!