Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Version Sorting

by ioannis (Prior)
on May 30, 2006 at 11:14 UTC ( #552470=note: print w/replies, xml ) Need Help??

in reply to Version Sorting

What about v-strings, or the other equivalent forms of version number ?

Something similar to the version module will be part of Perl 5.10.0 . In the example bellow, note that $a could also have been '1.2.3' or other forms of version number (see perldoc).

use version; # Version comparison # '1.2.3', 'v1.2.3', 1.2.3 my $a = qv( 'v1.2.3' ); my $b = qv( '1.2.29' ); # Compare print +($a>$b) ? $a : $b;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://552470]
[Discipulus]: yes but in a little house with fireplace; 2 friends and lot of beverages..
[Corion]: Discipulus: Aah, so it's not really walking through quick-changing weather
[Discipulus]: no fear: moonday i'll back (unless a big quake ... ;=)
[Corion]: Discipulus: Being out in nature is great, at least as long as you have a dry place to sleep and a warm fire ;)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-02-24 09:16 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (353 votes). Check out past polls.