I have tried several "comparators" to "alphabatize" the list(individually)to try to get;041351920234 Rabbit 0343120 041271024500 0430870 Apple 041460301399
To no avail, i tried using gt and lt as comparators but it puts them in the "wrong" order;Apple Rabbit 0343120 0430870 041271024500 041351920234 041460301399
I tried > and < to compare the values and it doesn't sort the Apple and Rabbit correctly becuase (obviously) perl interpets these two as "0" integers.Apple Rabbit 0343120 041351920234 0430870 041271024500 041460301399
Rabbit Apple 0343120 0430870 041271024500 041351920234 041460301399
I'm dealing with both "numbers" and "text" but i can't figure out how to get perl to handle the numbers correctly or the text vica-versa. I don't want to use the "sort { $a->[0] <=> $b->[0] }" approach because I'm using a very large database and don't want to have "not-enough" ram/memory problems.
Anyone have a soloution, routine, or procedure to accomplish what I'm trying to do here? Goal is to create an alphabatized file of items(/numbers).
In reply to Sorting Numbers & Text by PriNet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |