in reply to Perldoc's explanation of the difference between '&&' and 'and' has me confused
> Binary "and" ... is equivalent to && except for the very low precedence
added the 2+3*4 part
They do the same except for precedence, i.e. for many other operations "op"
- A op B and C means (A op B) and C
- A op B && C means A op (B && C)
much the same way as
- 2 + 3 * 4 means 2 + ( 3 * 4 )
See https://perldoc.perl.org/perlop#Operator-Precedence-and-Associativity for more on "precedence"
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
updates
|
---|
In Section
Seekers of Perl Wisdom