in reply to Re: Perldoc's explanation of the difference between '&&' and 'and' has me confused
in thread Perldoc's explanation of the difference between '&&' and 'and' has me confused
I agree in principle, but I tend to also use and and or in very complex expressions to be able to use less parens:
if (($foo && ($bar || $zebra) && ($fox & $mask) && $option_x) || ($zul +y & $mask2 || $lion)) {
=>
if ($foo && ($bar || $zebra) && ($fox & $mask) && $option_x or $zuly & + $mask2 || $lion) {
most often with line breaks. The "or" and "and" will be bold in my editors syntax highlighting making it even more clear what the logical groups are. YMMV.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perldoc's explanation of the difference between '&&' and 'and' has me confused
by LanX (Saint) on Jul 05, 2021 at 18:07 UTC | |
by ikegami (Patriarch) on Jul 05, 2021 at 18:31 UTC |