... uses 800 MB for loading the data and then 50MB more for sorting!$| = 1; my @data; $#data = 8500000; $#data = -1; while(<>) { push @data, $_ } print "sorting...\n"; use Sort::Key qw(ukeysort_inplace); ukeysort_inplace { (split(/\t/))[2] } @data; print "sorted\n"; sleep 100;
In reply to Re^7: Sorting a (very) large file (better*2)
by salva
in thread Sorting a (very) large file
by condar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |