in reply to What does the short circuit || mean ?
On line 2, you can add parentheses as follows:
(($ct eq 'text/plain') || ($ct eq 'text/html')) or next;
which makes it equivalent to
next if $ct ne 'text/plain' and $ct ne 'text/html';
The "short circuiting" is most noticable in the or operator: next is evaluated only if the previous condition is false.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What does the short circuit || mean ?
by peterr (Scribe) on Mar 10, 2015 at 01:06 UTC | |
by AnomalousMonk (Archbishop) on Mar 10, 2015 at 01:22 UTC | |
by peterr (Scribe) on Mar 10, 2015 at 01:36 UTC |