in reply to Finding the latest available version of a program
http://search.cpan.org/~edavis/Sort-Versions-1.5/Versions.pm would seem to be the thing.
You'd just use its versioncmp() function in the sorting.
I'm not sure what its answer is to Abigail's question "is version 4.2 older or newer than version 4.10?" because I'm not in a position to test right now.
Update: Not an answer to the actual question, I now realise, but to the "I'm going to have to get creative later" part.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print
|
|---|