[ale] Password Blanking

Jerry Yu zyu at tc.net
Mon Oct 26 10:32:27 EST 1998


hey, Bob,

before you prompt for passwd, you need to disable echo by call
 system "stty -echo";

this will stop the terminal from echoing the input on the screen.
you can enable it after you are done by 
system "stty echo";

If you want to be user-friendly, then, you can output (print out) a '*' or
anything whenever you get a char from the password input. done when the
char is '\n' or the 'enter'. suppose you know how to this.

Good luck.

if you do it in a web form , then you just need to specify the input type
as password like such,
<INPUT TYPE=password NAME="secret" SIZE=8 MAXLENGTH=8>

disclaimer: no guru.

Jerry Yu
----------------------------------------------------------------------------
Systems Engineer	| zyu at tc.net
Premiere Technologies	| 404-262-8544(O)	
Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu

On Mon, 26 Oct 1998, Bob Kruger wrote:

> 
> A quick question to the Perl gurus...
> 
> Is there a way with Perl to blank out or mask the input on the screen?
> 
> Example:  If asking for a password, all characters entered would look on the
> screen as "****" until the next <Enter>.
> 
> Thanks in advance for any assistance.
> 
> Regards - Bob
> 






More information about the Ale mailing list