in reply to Sorting Numbers & Text

This seems a little like cheating, but one way around the conflict would be to split your database lookup in twain:

select myid from mytable where myid rlike '^[A-Z].*' order by myid; select myid from mytable where myid rlike '^[0-9].*' order by abs(myid +);

Process them in that order, and you'll have your alpha ones ahead of your numerical ones, and both already sorted -- case-insensitive string sort on the first command, and numeric sort on the second. If you need to do any further sorting on either batch, it should be simpler. Also, letting the database engine order them should be faster than doing it in Perl after fetching them, especially if you put an index on the column in question.

Aaron B.
Available for small or large Perl jobs; see my home node.