if(/Title:(.+)/){ next RECORD if $seen{$hash{orderID}}{$1}; $seen{$hash{orderID}}{$1}++; $hash{title} = $1; }