[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Turning off echo on Mac while reading from STDIN



I'm porting a unix perl script to Mac, and this code give me some
problems:

system("stty -echo");
chop($password = <STDIN>);
system("stty echo");

Does anyone know how to make this work on a Mac? Preferably without
any external modules (it's a cross-platform project). Something like
&MacPerl::AskPassword( "Enter password: "); would haven been useful.

-- 
Rune Frøysa, unix-drift, USIT, UiO  Work e-mail: rune.froysa@usit.uio.no
"Where do your encryption keys want to go today?" - Peter Gutmann

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch