Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: CLI must not echo password

by foil (Sexton)
on Jan 19, 2005 at 05:34 UTC ( [id://423276]=note: print w/replies, xml ) Need Help??


in reply to CLI must not echo password

Check out Term::ReadKey Readmode 2

Replies are listed 'Best First'.
Re^2: CLI must not echo password
by PhilHibbs (Hermit) on Jan 20, 2005 at 13:55 UTC
    Term::ReadKey is the only solution that I could get to work. It is unfortunate that it needs a non-standard module. Here's my code:
    use Term::ReadKey; print 'Enter Username: '; my $user = <STDIN>; chomp $user; print "Enter Password: "; ReadMode ('noecho'); my $pass = <STDIN>; chomp $pass; ReadMode ('restore'); print "\n";
    Update: link to kobesearch since search.cpan is down

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found