Áshin László <ashinlaszlo@xxxxxxxxx> writes: > No need to check for more lines of the authentication database after found a > matching one. s/found/finding/; But I see a bigger issue here. Is it plausible that you might want to allow two entries for one user, with two different passwords, in an authdb file? The current code allows it, but if we want to disallow it, we could instead add your "last", like this, if you do not break the structure of the conditional statements in the original code. while (<$passwd>) { if (m{^\Q$user\E:(.*)}) { if (crypt($user, $password) eq $1) { $auth_ok = 1; } last; } } Or have the "last" inside the inner "if" statement to keep that logic. Either way I think the original nested "if" is much easier to read than your version. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html