in reply to Sorting an array containing version numbers
Using the native Perl sort function with a customized comparison function should do what you need, assuming Perl is fast enough for your needs. sort explains the basics, and combining a split with /\./ and piecewise comparison of the resulting arrays with the numeric comparison operator <=> will handle the rest. If this is not fast enough, you can write it all in C and use XS (perlxs, perlxstut).
|
---|