Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Sorting an array containing version numbers

by tomfahle (Priest)
on Dec 23, 2009 at 11:32 UTC ( [id://814078]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my @sorted = sort versioncmp @version_numbers;
    
    print join("\n", @sorted), "\n";
    
  2. or download this
    0.9
    1.1
    ...
    2.1.4.0046
    2.3.5-0022
    2.3.5-0041
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (None)
    As of 2024-04-25 01:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found