in reply to Logical Not not working!!!
O => 1; 1 => 0 is the truth table for exclusive disjunction; ie. XOR:
print @a;; 1 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 $_ ^= 1 for @a;; print @a;; 0 0 1 1 0 0 1 1 1 1 1 0 0 0 1 1 [download]