I always use or in such situations, and I dislike perldocs which do otherwise, because these are invitations for refactoring problems.
Personally I use || only in
- in arithmetic expressions $x = $y || $z
- to override false defaults were $x ||= $y
update
swapped $a, $b with $y,$z to appease hippo ;-) | [reply] [d/l] [select] |
I always use or in such situations, and I dislike perldocs which do otherwise
So do I. I also dislike the use of $a and $b in docs as metasyntactic variables as they are subsequently used in cargo-culted code and become the cause of errors. There are, after all, plenty of others to choose from.
| [reply] [d/l] [select] |