in reply to finding the first unique element in an array

You push on @uniq, but you don't do anything with it. Why not just:
my %seen; for (my $i = 0; $i < @name1; $i ++) { next if $seen{$name1[$i]}++; print "$name1[$i]\t$name2[$i]\t$percent[$i]\n"; }