note
RhetTbull
What you are describing is the basic idea behind the [id://9108|Schwartzian Transform]. See my [id://170792|write-up] elsewhere in this [id://170775|thread] for some <a href="http://www.perl.com/doc/FMTEYEWTK/sort.html">links</a> with more information. The idea is that you do the expensive operation (in this case, it's split) once and use a data structure to store the result. You then sort on the results and extract the original information when done. Our very own [merlyn] was the <A HREF="http://groups.google.com/groups?selm=MERLYN.95Apr8160955%40linda.teleport.com&output=gplain">first</a> (AFAIK) to apply his twisted mind to this problem and come up with a very perlish (or lispish depending on your mother tongue) method of doing this in one fell swoop using map.
170775
170840