That is an implementation detail. :-)
Remember, code is written primarily for programmers to read and only incidentally for a machine to execute. Did you profile this and found it to be a problem?
NB: I quarreled with the thought of adding a note to the effect that this construct loops twice on my previous node, but decided against it. The typical data set in this function would consist of one element, or of less than 10 elements in most other cases. Musing about its efficiency therefore seems like a rather pointless excercise.
Makeshifts last the longest.
In reply to Re^3: The trouble with Perl Idiom
by Aristotle
in thread The trouble with Perl Idiom
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |