in reply to How do I find if an array has duplicate elements, if so discard it?

this is some code i applied to an array:
@legit is an array of elements
@uniq is the resulting array of unique elements.
foreach(@legit) { unless($b{$_}++) { push(@uniq,$_); } }
  • Comment on Re: How do I find if an array has duplicate elements, if so discard it?
  • Download Code