On 5/14/05 Leif Andersson wrote:
It is funny, I started with a Schwartzian transform, but thought to
myself why not simplify the code?. Not realizing it is a performance
gain. I have always thought of it only as a means to do more
complicated sorts.
...
Funny, once more, is that one member of this
On Sat, 14 May 2005, Bruce Van Allen wrote:
If you haven't seen it, you might be interested in the packed-default
sort described by Uri Guttman and Larry Rosler, and now usually refered
to as the Guttman-Rosler sort. For their original paper, see:
How would you do to re-order the fields in a MARC::Record-record?
I just needed that kind of thing and after some struggeling came up with:
@{$record-{_fields}} =
sort {
lc($a-{_tag}) cmp lc($b-{_tag})
}
@{$record-{_fields}};
It seems to work, but I am