in reply to Passwords on unix

Have a look at the documentation for crypt. It even specifies a way to do what you are asking:
$pwd = (getpwuid($<))[1]; system "stty -echo"; print "Password: "; chomp($word = <STDIN>); print "\n"; system "stty echo"; if (crypt($word, $pwd) ne $pwd) { die "Sorry...\n"; } else { print "ok\n"; }
This was lifted straight from perldoc -f crypt.

CU
Robartes-