Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Anyone use "xor" in conditionals?

by edan (Curate)
on Jul 14, 2003 at 07:12 UTC ( [id://273894]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ((($before eq 'A' || $before eq 'B') && $after eq 'Z')
        || ($before eq 'Z' && ($after eq 'A' || $after eq 'B')))
    {
        # change from A|B <=> Z
    }
    
  2. or download this
    if ($before eq 'Z' xor $after eq 'Z')
    {
        # change from A|B <=> Z
    }
    
  3. or download this
    if (($before ne 'Z' && $after eq 'Z')
        || ($before eq 'Z' && $after ne 'Z'))
    ...
    {
        # change from A|B <=> Z
    }
    
  4. or download this
    /usr/local/lib/perl/5.6.1/DateTime.pm:    if ( $self->{tz}->is_floatin
    +g xor $was_floating )
    

Log In?
Username:
Password:

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

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

    No recent polls found