if ($passhash eq crypt($incoming_password,$passhash)) { # $incoming_password is correct }