So? Did you actually bother to look up what perldoc -f crypt
displays? Or did it give you more satisfaction to write a
stupid reply than to do some trivial research. Let me quote
it for you:
Here's an example that makes sure that whoever
runs this program knows their own password:
$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";
}
Abigail |