Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://151187]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-10-23 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (279 votes). Check out past polls.

    Notices?