print if /...(...).../ && $seen{$1}++; #### print if /...(...).../ && !$seen{$1}++;