The thread linked to by the other anon above contains some ideas. Personally I like Scalar::Util's looks_like_number, since AFAIK that's the same function Perl uses internally. If you know that your columns always contain either numbers xor non-numbers, testing the first value of the column should be enough to determine which comparison to use for that column. If however your columns contain a mix of numbers and non-numbers (e.g. "1 a","foo","3.14","42","b5ar","93b"), you'll have to make a decision on how to sort a column like that.
In reply to Re^4: Sorting based on any column
by Anonymous Monk
in thread Sorting based on any column
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |