You could also take a look at Sort::External. From its documentation:
Problem: You have a list which is too big to sort in-memory.
Solution: "feed, finish, and fetch" with Sort::External, the closest thing to a drop-in replacement for Perl's sort() function when dealing with unmanageably large lists.
In reply to Re: Sorting Gigabytes of Strings Without Storing Them
by moritz
in thread Sorting Gigabytes of Strings Without Storing Them
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |