in reply to Sort ByVersion

There's a CPAN module for that already. ;) Take a look at Sort::Versions. It's not been touched in 4 years, so maybe someone can find something to optimize in it.

And in general terms, you're better off using a transform of some kind... probably a schwartzian transform. And looking at the code, he could use it, too. Here's the skeleton:
@sorted = map { $_->{ORIG_DATA} } sort { $a->{SORT_DATA} cmp $b->{SORT_DATA} } map { { ORIG_DATA => $_, SORT_DATA => func($_) } @original;


$_="goto+F.print+chop;\n=yhpaj";F1:eval

Replies are listed 'Best First'.
RE: Re: Sort ByVersion
by ChOas (Curate) on Nov 02, 2000 at 21:14 UTC
    I just checked out the CPAN Module....

    <EGO MODE> I like mine better </EGO MODE>

    ;)))), really ;))