in reply to Re: next unless condition
in thread next unless condition
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: next unless condition
by ikegami (Patriarch) on Apr 01, 2016 at 15:51 UTC | |
|
Re^3: next unless condition
by dsheroh (Monsignor) on Apr 01, 2016 at 07:51 UTC | |
by Marshall (Canon) on Apr 01, 2016 at 14:45 UTC | |
by RonW (Parson) on Apr 04, 2016 at 19:13 UTC | |
by BrowserUk (Patriarch) on Apr 04, 2016 at 20:29 UTC | |
by RonW (Parson) on Apr 04, 2016 at 23:45 UTC | |
by Marshall (Canon) on Apr 04, 2016 at 20:35 UTC | |
by RonW (Parson) on Apr 04, 2016 at 23:55 UTC | |
|
Re^3: next unless condition
by haukex (Archbishop) on Apr 01, 2016 at 07:44 UTC |