Use a hash to store the information whether or not a record has been seen already. Use the record as key.
use strict; use warnings; $/="\n\n"; my %seen; while(<DATA>){ print unless $seen{$_}++; } __DATA__ a b b a
In reply to Re: How to remove duplicate records
by hdb
in thread How to remove duplicate records
by SatisfyMyStruggles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |