Over the last 20 years, I have seen this construct written in the very perlish manner of :
$cell || next;
which is the same as:
$cell or next;
The explanation that I have "heard" in the past is that this performed faster than other functionally equivalent alternatives. I have always been skeptical of this POV and too lazy to actually test it
I personally like the way next unless $cell reads for loop control and often use this construct. In general, I am not a big fan of unless and general use If ( not $cell ) with the exception of loop control. My rationale behind this is that I think it is easier to read and comprehend for someone who comes behind me to maintain any code that I have created. Please note the use of belief here. I do not purport that to be a fact.
lbe
In reply to Re^2: next unless condition
by learnedbyerror
in thread next unless condition
by hankcoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |