Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Reading a password with Term::ReadLine

by Starky (Chaplain)
on May 11, 2004 at 03:33 UTC ( [id://352298]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my $term = new Term::ReadLine;
      print $term->ReadLine;
    
  2. or download this
      $attribs = $term->Attribs;
      $attribs->{redisplay_function} = $attribs->{shadow_redisplay};
      $password = $term->readline("Password: ");
      $term->remove_history($term->where_history);
    
  3. or download this
      starky@freak bin $ ./readline-password-test.pl 
      Term::ReadLine uses [Term::ReadLine::Perl]
    ...
      Password:  passwd
      The username is [uname] and the password is [passwd]
      starky@freak bin $
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-18 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found