Well I'm on Win32 Platform and it works fine for me... This code snippet I
used came from the Perl Cookbook p530. 
I have made some changes from that code, but here's what I use.

        print "Enter your Password: ";
        ReadMode 'noecho';
        $pass1 = ReadLine 0;
        ReadMode 'normal';
        chomp $pass1;
        print "\n";

        print "Confirm Your Password: ";
        ReadMode 'noecho';
        $pass2 = ReadLine 0;
        ReadMode 'normal';
        chomp $pass2;
        print "\n";

HTH

Keith

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 21, 2002 7:09 PM
To: [EMAIL PROTECTED]
Subject: Term::ReadKey on Win32 Changing Readmode?


Okay, I've got a little script that takes user passwords on a Win32 terminal
client. I've used Term::ReadKey from the activestate module list to turn off
screen echo.

So it's something like
sub{
ReadMode 2; #turns off echo
Prompt for password;
Get password;
ReadMode 1; #should turn echo back on
}

So it turns the screen echo off nicely, but echo won't turn back on. I've
tried ReadMode 0 as well. The docs suggest that ReadMode 1 is 'normal' but
danged if I can get it back.

Am I missing something stupid?

Thanks,
John


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

Reply via email to