in reply to Comparing Version Numbers

This is going to depend mostly on what is doing the determining of which ones are newer. Assuming these are RPM files, as they appear to be, the rpm documentation includes a description of how RPM determines if one package is "newer" than another.

From the RPM documentation:

The algorithm that RPM uses to determine the version ordering of packages is simple and developers are encouraged not to rely on the details of its working. Developers should keep their numbering scheme simple so any reasonable ordering algorithm would work. The version comparison algorithm is in the routine rpmvercmp() and it is just a segmented strcmp(3). First, the boundaries of the segments are found using isdigit(3)/isalpha(3). Each segment is then compared in order with the right most segment being the least significant. The alphabetical portions are compared using a lexical graphical ascii ordering, the digit segments strip leading zeroes's and compare the strlen before doing a strcmp. If both numerical strings are equal, the longer string is larger. Notice that the algorithm has no knowledge of decimal fractions, and perl-5.6 is "older" than perl-5.00503 because the number 6 is less than the number 503.

If you are on a Red Hat Linux machine, there is very good documentation with examples in /usr/share/doc/rpm-<version>/dependencies. There are also a couple of RPM modules in CPAN.