You could also use
!$a == !$b
but that relies on the fact than the true and false values returned by Perl ops are 1) always the same, and 2) numeric*. xor is definitely the way to go.
* — They're also strings, but that's not relevant here.
In reply to Re^2: Hints Towards Writing a Module with New Operators
by ikegami
in thread Hints Towards Writing a Module with New Operators
by swampyankee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |