in reply to If/Else or Unless Not Triggering Correctly
I think your Boolean logic for the "if" code is wrong.
From https://en.wikipedia.org/wiki/De_Morgan%27s_laws:
"not (A or B)" is the same as "(not A) and (not B)"
Using your example, where a condition like $data eq 'ARCHITECH' is represented by letter A:
unless( A or B or C )means the same as:
if not ( A or B or C )which, by De Morgan's Law, is equivalent to :
if ( not-A and not-B and not-C )But you have written the "if" code as:
if ( not-A or not-B or not-C )which does definitely not match your "unless" code.
|
|---|