If I am not mistaken, that removes even the first instance of any entry that has a duplicate. Usually one wants to remove only subsequent entries, leaving the first. For that, cache the count on the fly:
sub uniq { my %cache; return grep { not $cache{$_}++ } @_ }In reply to Re: compile errors
by jonadab
in thread compile errors
by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |