in reply to Sorting a large file

You may wish to try File::Sort to do a merge-sort using limited memory without requiring external databases installed.

I have not used it, just decided to look and see whether CPAN had anything to keep you from having to roll your own merge-sort from scratch.