Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Ghosted input

by naikonta (Curate)
on Jun 15, 2007 at 04:14 UTC ( #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
Node Status?
node history
Node Type: note [id://621396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2021-06-13 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (54 votes). Check out past polls.

    Notices?