http://qs321.pair.com?node_id=134933


in reply to how to make a password dissapear?

Yesterday, while romping around the Monastery, I found the answer I was looking for. I don't remember which thread provided the answer as I was so excited when I found it, I lost it somehow. So I'll post the snippett in hopes that the person will take credit, so I can thank them. Sometimes the answer your looking for is right under your nose...
system('/usr/bin/stty', '-echo'); chomp($password=<STDIN>); system('/usr/bin/stty', 'echo');

Replies are listed 'Best First'.
Re: Re: how to make a password dissapear?
by cwest (Friar) on Dec 28, 2001 at 22:48 UTC
    I have to admit, that looks like you're trying way too hard.

    I'd probably give Term::ReadKey a shot if I were you.

    use Term::ReadKey; ReadMode 2; chomp( my $password = ReadLine ); ReadMode 0;
    --
    Casey
       I am a superhero.