http://www.perlmonks.org?node_id=570887


in reply to && and and (well, you try searching for an answer)

Can someone explain the difference between && and and and or and ||?

'and' and 'or' are lower precedence

Extra points if you can offer a search term for this on google and/or perlmonks that would help answer this without a new post.

google for "perl logical operators"

Super bonus-points if you can render the first paragraph in acceptable and comprehensible english.

Can someone explain the difference between '&&' and 'and' and 'or' and '||'?

  • Comment on Re: && and and (well, you try searching for an answer)

Replies are listed 'Best First'.
Re^2: && and and (well, you try searching for an answer)
by apotheon (Deacon) on Sep 03, 2006 at 07:22 UTC

    refactor:

    "Someone please explain the difference between '&&' and 'and', and the difference between 'or' and '||'."

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin