Come for the quick hacks, stay for the epiphanies. | |
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?? |
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:
In Section
Seekers of Perl Wisdom
|
|