in reply to Sorting Gigabytes of Strings Without Storing Them
Honestly, the best way if you are unix/linux is the standard 'sort' utility.
And I have no idea what you are doing, but if you haven't done so already, take a look at Bioperl