Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Ghosted input

by naikonta (Curate)
on Jun 15, 2007 at 04:14 UTC ( [id://621396]=note: print w/replies, xml ) Need Help??


in reply to Ghosted input

Well, If you don't mind to use a module :)
use strict; use warnings; use Term::ReadKey; my $hint = "I'm not going to tell you! You knew it already"; print "Username: "; chomp(my $user = <STDIN>); # validate $user print "Password: "; ReadMode 'noecho'; chomp(my $pass = <STDIN>); ReadMode 'normal'; # validate $pass print "\nYou said: username=$user, password=($hint)\n";

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^2: Ghosted input
by monoxide (Beadle) on Jun 15, 2007 at 04:34 UTC
    Aha! This is exactly what I'm looking for thankyou. I don't mind using a module, and I tried a quick search of CPAN, but couldn't find anything.

    monoxide

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://621396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found