Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to (Ovid - how to find odd answers) Re: how to make a password dissapear? by Ovid
in thread how to make a password dissapear? by defyance

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others having a coffee break in the Monastery: (3)
    As of 2025-06-21 10:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.