in reply to Re^3: Confused by a couple of idioms
in thread Confused by a couple of idioms
The higher precedence of && can be illustrated by the difference between these two:
$ perl -E '$foo = 1 && $bar = 3; say $foo' 3 $ perl -E '$foo = 1 and $bar = 3; say $foo' 1
This is why the word operators ( and or not ) should generally be used for control flow instead of the high-precedence symbolic operators ( && || ! ). HTH.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Confused by a couple of idioms
by bliako (Abbot) on Feb 22, 2019 at 13:05 UTC |