1) The one that will always work is to split up the file in smaller chunks, sort the separately, and then merge them again.
2) If you work on a unixish system, you could try to abuse you system's sort program, at least GNU sort handles memory limitations automatically by creating temporary files.
3) Search on CPAN. Maybe there's a module that does what you want? File::Sort looks promising at a first glance (actually CPAN should be your first place to look ;-)
In reply to Re: Sorting a (very) large file
by moritz
in thread Sorting a (very) large file
by condar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |