Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by explorer (Chaplain)
on Sep 02, 2006 at 20:34 UTC ( [id://570886]=note: print w/replies, xml ) Need Help??


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

The difference is the precedence.

From perlop:

As more readable alternatives to "&&" and "||" when used for control flow, Perl provides "and" and "or" operators (see below). The short-circuit behavior is identical. The precedence of "and" and "or" is much lower, however, so that you can safely use them after a list operator without the need for parentheses:
  • Comment on Re: && and and (well, you try searching for an answer)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2025-06-14 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.