push @keep, $_ unless $seen{$name}++;