Don't ask to ask, just ask | |
PerlMonks |
Re: Re: Anyone use "xor" in conditionals? (yes/no)by demerphq (Chancellor) |
on Jul 14, 2003 at 09:16 UTC ( [id://273916]=note: print w/replies, xml ) | Need Help?? |
On at least two occasions (but not very many more than that) I've written code like: Heh. In my test code I use the syntax you've shown quite regularly. I was unaware that xor did the right thing with undef and hence have used the !$x == !$y or !$x != !$y syntax fairly often. And I also agree with you that I prefer this syntax to xor as it to me makes the intent of the test easier to see. --- demerphq <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
In Section
Seekers of Perl Wisdom
|
|