in reply to Clarify I want to discard the set of elements if there are any duplicates.
The down side is that it looses original order.@rray=(1,2,2,3,3,3,4,4,4,4); for(@rray) { $seen{$_}++; } @nodups=keys %seen; print "@nodups\n";
Originally posted as a Categorized Answer.
|
|---|