By STAR format I assume you mean when the user types in the password you want ***** to appear not the actual password. With CGI/HTML you would use the <input type=password name=pass> type tag. But you don't say what you are using. Besides HTML it could be Shell (dos/unix), Curses, Tk, Wx or .....? If you either post code of specify what you are using then you may just get a useful answer.

Your question is pretty obtuse BTW. A better question might be I have a program using (Curses|CGI|.*) I need to prompt the user for a password. At the moment the password appears in plain text on the screen. I want it to appear as ****. How can I do this?

perlfaq8 gives this example (no stars but no plaintext either)

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

Of course CPAN provides a convenience version of this basic algorithm Term::ReadPassword that handles backspaces etc.

cheers

tachyon


In reply to Re: Password Text by tachyon
in thread Password Text by Dirty Luigi

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.