Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

(tye)Re: Module version checking flaw?

by tye (Sage)
on Nov 07, 2002 at 18:28 UTC ( #211170=note: print w/replies, xml ) Need Help??


in reply to Module version checking flaw?

In case you also run into more complex version numbers like "v1.3a.4beta", you can get good results with:

sub cmpVersions { my( $x, $y )= @_; for my $v ( $x, $y ) { $v =~ s/(\d+)/ pack "N", $1 /ge; } return $x cmp $y; }

        - tye

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-08-17 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?