in reply to Sorting based on any column
Maybe applicable
No, it's not, as OP is only working with numbers (in the Perl sense), not strings.
Ack, apologies, I spent too much time looking at the code and not enough reading the question. (In my defense, the OP's sample data isn't really representative then :-) )