[Perl] Silent Input

I would like to use the WWW::Mechanize module to access a webpage that is password-protected. I was wondering if there was a way to make the input silent when asked from the script. For example:

What is your password: <password>

Where <password> is where you put your password, but is silent and cannot be seen.

Thanks.

I've done this with shell scripts using something like:

stty -echo
 printf "Password: "
 read pass
stty echo

Looking at an strace of that, it looks like you could skip running stty and issue the ioctl yourself, but that heads out beyond my knowledge...

This is in the Perl FAQ:

perlfaq8 - perldoc.perl.org