develooper Front page | perl.beginners | Postings from February 2002

Re: how do I make a input from STDIN to be silent??

Thread Previous
From:
Briac Pilpré
Date:
February 12, 2002 01:22
Subject:
Re: how do I make a input from STDIN to be silent??
Message ID:
20020212092226.71589.qmail@onion.perl.org
On Tue, 12 Feb 2002 12:15:17 +1100, Ivan Teliatnikov
<ivan@es.usyd.edu.au> wrote:
> I want to read a passwd string from the terminal but without
> displaying it back to the screen.

 perldoc -q password

#!/usr/bin/perl -w
use strict;
use Term::ReadKey;

print "Password: ";

ReadMode('noecho');
chomp( my $password = ReadLine(0) );
ReadMode('normal');

print "\nYou entered '$password'\n";

__END__
									   

 
> Thank you.
> 


-- 
briac
 << dynamic .sig on strike, we apologize for the inconvenience >>


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About