laziness, impatience, and hubris | |
PerlMonks |
Re: warning! -- Why?by kcott (Archbishop) |
on May 12, 2022 at 09:37 UTC ( [id://11143821]=note: print w/replies, xml ) | Need Help?? |
G'day jwkrahn, It's a common mistake to forget, or not realise, that "&&" has a higher precedence than "=" which, in turn, has a higher precedence than "and". See "perlop: Operator Precedence and Associativity" (there's a table at the end of that section which lists the order of precedence). Changing "and" to "&&" gets rid of the warning; however, in this instance, that's probably not what you want. Compare these two:
— Ken
In Section
Seekers of Perl Wisdom
|
|