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!