Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sorting An Array of Versions

by I0 (Priest)
on Mar 12, 2002 at 18:45 UTC ( #151187=note: print w/ replies, xml ) Need Help??


in reply to Sorting An Array of Versions

sub ST(&@){ my $metric=shift; map {$_->[0]} sort {$a->[1] cmp $b->[1]} map {[$_,&{$metric}]} @_ } my @versions = qw(2.0.0 1.0.9 1.0.10 1.1.0 1.1.2); @versions = ST {pack'C*',split/\./} @versions;


Comment on Re: Sorting An Array of Versions
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://151187]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2014-07-28 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (205 votes), past polls