Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 ( #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
Node Status?
node history
Node Type: note [id://134538]
help
Chatterbox?
[ambrus]: Corion: I have no problem with exit codes and shell pipeline. My problem is that the current process requires a lot of manual intervention from me, including editing the source codes.
[ambrus]: (Also a lot of manual intervention by two or three other co-workers, who do other parts of the process.)
[ambrus]: Some of the manual part is unavoidable, but not all.
[choroba]: LanX was there a way to recover the numbers from the remaining information?
[Corion]: LanX: Ow ;)
Discipulus manual work: i just tell the same to my boss: every time the quick solution is to assign some manual data entry task to my group.. because we have not direct access to many databases here..
[LanX]: point is: in high speed trade each bank has to remember what he has to get from the others... so dresdner got billed for losses but couldn't claim gains
Discipulus is this the IT?
[Corion]: Discipulus: Well, in many cases it doesn't make sense to build an interface and complicated program just to enter 20 rows into a database ;) But yes, automating data imports should pay off in the long run

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-03-29 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.