in reply to Re: "Out of memory" problem
in thread "Out of memory" problem

You need to use a sorting algorithm that is "in place".
No. You can simply use external sorting (i.e. you are not restricted to in-place algorithms, especially if you have plenty of free disk space).

Update: On the CPAN, see: