On 8/21/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
snip
> my @new = map { $_->[0] } sort { $b->[1] <=> $a->[1] or $b->[2] <=>
> $a->[2] or $b->[3] <=> $a->[3] } map { [ $_, split/\D+/ ] } @arr;
snip

While splitting on non-number is a nifty solution, it would break if
the custom tag can contain a number (16-custom2.2-14).  It is better
to nail down the version number scheme and write a regex that pulls
the required info from it that throws an error if a version does not
match the scheme.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to