As the input file is sorted, uniq infile > outfile ought to do the job very quickly.
If for some reason you don't have the uniq command available, try
#! perl -w use strict; my $last = <>; while( <> ) { print $last if $_ ne $last; $last = $_; } __END__ thisscript infile > outfile
In reply to Re^3: Large file, multi dimensional hash - out of memory
by BrowserUk
in thread Large file, multi dimensional hash - out of memory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |