in reply to Sort string according to numbers in it
perldoc -q sort [download]
... and there are also some good tutorials.
Give a man a fish: <%-(-(-(-<