Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

(Ovid - how to find odd answers) Re: how to make a password dissapear?

by Ovid (Cardinal)
on Dec 27, 2001 at 06:09 UTC ( [id://134538]=note: print w/replies, xml ) Need Help??


in reply to how to make a password dissapear?

I recently answered this question on the beginners-perl mailing list. I think you might find the reponse very helpful.


use Term::ReadKey; ReadMode('noecho'); $password = ReadLine(0);

I've never used that before but some may be curious how I found it. Here's the trick:

    perldoc perltoc > perltoc.txt

That sends the perltoc (Perl Table of Contents) to a text file. I sometimes scan through this file to pick up new tricks. When I see something that interests me (such as "password"), I scan through the relevant entries. In this case, I saw the following entries:

    [snip]
    How do I clear the screen?
    How do I get the screen size?
    How do I ask the user for a password?
    How do I read and write the serial port?
    [snip]

The one about asking a user for a password looked useful, so I typed in:

    perldoc -q "How do I ask the user for a password?"

That actually gave a lot more information than what I sent you, so you should give it a try :)

The '-q' options stands for "FAQ keyword", but it can just as easily stand for 'question'.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

  • Comment on (Ovid - how to find odd answers) Re: how to make a password dissapear?
  • Download Code

Log In?
Username:
Password:

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

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

    No recent polls found