in reply to How to remove duplicate records
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
|
|---|