>From perlfaq8,
How do I ask the user for a password?
(This question has nothing to do with the web. See a different FAQ for
that.)
There's an example of this in crypt in the perlfunc manpage. First, you put
the terminal into ``no echo'' mode, then just read the password normally.
You may do this with an old-style ioctl() function, POSIX terminal control
(see the POSIX manpage or its documentation the Camel Book), or a call to
the stty program, with varying degrees of portability.
You can also do this for most systems using the Term::ReadKey module from
CPAN, which is easier to use and in theory more portable.
use Term::ReadKey;
ReadMode('noecho');
$password = ReadLine(0);
Hope that helps...
-----Original Message-----
From: Rob Das [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 09:24
To: [EMAIL PROTECTED]
Subject: Hide password entry
Hi All:
I'm trying to hide the entry on the screen of a password as it's being
entered on Windows NT. In Unix I can simply use
system "stty -echo";
but "echo off" in NT does not do the trick.
Can anyone suggest a Perl method, or an NT method please?
Thanks
Rob Das
Oracle DBA
MEDecision.com
610-254-0202 ext. 1293
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]