[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] OT Perl Question
- Subject: [ale] OT Perl Question
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed, 14 May 2003 21:01:08 -0400
Robert Heaven wrote:
> I need to write a short perl script that will prompt me for a password
> without echoing what I type. Any ideas?
>
#!/usr/bin/perl
`stty -echo`;
open(STDIN, "<");
print "enter";
read STDIN, $foo, 1;
print $foo;
`stty echo`;
read will only retain a single character above, adjust to your liking.
There may be a better way then calling the shell 'stty -echo'
--
Until later: Geoffrey esoteric at 3times25.net
The latest, most widespread virus? Microsoft end user agreement.
Think about it...
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale