in reply to Add distinct elements to an array

What you are talking about is very similar to the question, "PerlFAQ 4: How can I remove duplicate elements from a list or array?," which I think suggests methods you may wish to look into.

(Personally, I tend toward:

{ my (%names); foreach (@Person) { $names{$_}++; } @Person = keys(%names); }
-but that's just me.)