You might also want to take a look at
Re^3: Alpha number sort (two truer to spec). As it
is a more complex example of
Re: Version Sorting. However it does not solve your problem directly as it assumes 1.12 is a floating point number rather than a version number.
-- gam3
A picture is worth a thousand words, but takes 200K.