Using an array for that isn't scalable as your search time will be linear. The better way to do it is to use your links as hash keys.
If you absolutely must keep an array, keep both an array and a hash. Something like this will do the trick.
push @array, $item unless $seen{$item}; $seen{$item}++;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Pushing unique items onto an array
by sauoq
in thread Pushing unique items onto an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |