in reply to Re: finding the distinct elements in an array
in thread finding the distinct elements in an array
uses a hash!sub uniq (@) { my %h; map { $h{$_}++ == 0 ? $_ : () } @_; }
Whilst in principal using a module is often a good thing, maybe it would be better if the OP understood what was going on under the hood first?
Just my not so humble opinion.
|
|---|