Keep It Simple, Stupid | |
PerlMonks |
Re^2: next unless conditionby learnedbyerror (Monk) |
on Mar 31, 2016 at 22:15 UTC ( [id://1159233]=note: print w/replies, xml ) | Need Help?? |
Over the last 20 years, I have seen this construct written in the very perlish manner of :
which is the same as:
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 Section
Seekers of Perl Wisdom
|
|