in reply to Re: Simplify code in Perl with "unless" loop
in thread Simplify code in Perl with "unless" condition
unless (...) is the equivalent of if (not (...))
yes this is obviously true, but can be error prone in the case of complex conditions.
De_Morgan's_laws are useful in this case to do the correct translation between the plain and the negated form of a (possibly comlpex) condition.
I was suggested to investigate such laws when i had an Untillian Headache
L*
|
|---|