![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: return !!by Limbic~Region (Chancellor) |
on Mar 04, 2009 at 20:29 UTC ( #748311=note: print w/replies, xml ) | Need Help?? |
cosmicperl,
I am suprised that no one mentioned why this convention exists. It is likely a candidate for a small "Perl Idioms Explained". If you are only interested in the truth of an expression, you can save some cycles by not copying the entire data. In this case, I would have preferred return scalar @array because of the way perl handles truth. Cheers - L~R
In Section
Seekers of Perl Wisdom
|
|