Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Burned by precedence rules

by w-ber (Hermit)
on Dec 23, 2008 at 13:15 UTC ( #732286=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub done {
        my $self = shift;
        return not $self->foo and not $self->bar; # gotcha!
    }
    
  2. or download this
        (return not $self->foo) and not $self->bar;
    
  3. or download this
    sub done {
        my $self = shift;
        return !$self->foo && !$self->bar; 
    }
    
  4. or download this
        my $bool = 1 and 0;
        # $bool == 1 and $_ == 0; may not be what you expect!
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://732286]
Approved by Corion
Front-paged by friedo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-12-22 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls