in reply to Reading password from STDIN without echoing
Please NOTE! this is a NOT recommended method of hiding passwords, but to answer your question, keep the password from being seen?
Look at Term::ReadKey
#! /use/bin/perl use strict; use Term::ReadKey; ReadMode( "noecho"); print "Enter pwd please :"; chomp (my $pwd = <>); ReadMode ("original") ; print "\nYou typed $pwd!\n";
Update: This has been tested on a Win32 platform.
-----Of all the things I've lost in my life, its my mind I miss the most.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Reading password from STDIN without echoing
by gitarwmn (Beadle) on Nov 14, 2003 at 19:09 UTC | |
by AcidHawk (Vicar) on Nov 14, 2003 at 19:27 UTC |
In Section
Seekers of Perl Wisdom