unless ( $password_validated ) { # return 0; # <-- Usually bad return; } else { # do what must be done }