Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: Anyone use "xor" in conditionals? (yes/no)
in thread Anyone use "xor" in conditionals?

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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://273916]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-03-19 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found