Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: A better (ie.more concise) way to write this?by sundialsvc4 (Abbot) |
on Dec 17, 2013 at 00:31 UTC ( [id://1067397]=note: print w/replies, xml ) | Need Help?? |
Now the dust has settled on this one, I have a question ... yes, a question ... My solution to this problem came up more-or-less like this:
In other words, using the foreach() construct to iterate through the list/array, with $_ being an automatic alias to each entry in succession, rather than actually indexing into the array. Intuitively, this seems to me that this would be “more efficient.” Is it? Also... among the various solutions that were proffered in this thread, how much difference in timing are we actually talking about here?
In Section
Seekers of Perl Wisdom
|
|