in reply to finding the first unique element in an array
You're incrementing an element of %seen twice with each pass. That will prevent printing, but @uniq should contain what you expect.
Try this instead:
my @uniq; my %seen; for (0 .. $#name1) { next if $seen{$name1[$_]}++; push @uniq, $name1[$_]; print "$name1[$_]\t$name2[$_]\t$percent[$_]\n"; }
After Compline,
Zaxo
|
|---|