my %seen; @seen{@data, @rows} = (); @data = keys %seen;