if (crypt($guess, $pass) eq $pass) { # guess is correct }