Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 surveying the Monastery: (11)
As of 2014-12-19 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (84 votes), past polls