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.
|