In case you also run into more complex version numbers like "v1.3a.4beta", you can get good results with:
- tyesub cmpVersions { my( $x, $y )= @_; for my $v ( $x, $y ) { $v =~ s/(\d+)/ pack "N", $1 /ge; } return $x cmp $y; }
In reply to (tye)Re: Module version checking flaw?
by tye
in thread Module version checking flaw?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |