in reply to Precedence for Idiots
The penultimate row of the table in the "Logical Questions" section seems incorrect to me.
$ perl -E '$x = 1 == 2 && 3; say $x;' $
This is what I would expect since 1 == 2 is clearly false so $x is false and the right hand side of the && is never evaluated. Perhaps you meant this instead:
$ perl -E '$x = 2 == 2 && 3; say $x;' 3 $
Now the first term is clearly true and the second term evaluates to 3 as intended.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Precedence for Idiots
by soonix (Canon) on Mar 15, 2020 at 17:29 UTC | |
Re^2: Precedence for Idiots
by rsFalse (Chaplain) on Mar 05, 2021 at 11:39 UTC |
In Section
Tutorials