That increments $seen{$name} twice the first time $name is seen - once in the test and again in the controlled block. You don't need the increment in the controlled block. The count shown in the console output should have alerted you to the problem.
In reply to Re^2: Saving array duplicates, not using a hash?
by GrandFather
in thread Saving array duplicates, not using a hash?
by gctaylor1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |