The short answer would be to use the uniq function provided by List::MoreUtils.
What you have here seems incredibly complicated. Compare with the function I've just mentioned:
sub uniq (@) { my %h; map { $h{$_}++ == 0 ? $_ : () } @_; }
-- Ken
In reply to Re: Braino - why is this not working?
by kcott
in thread Braino - why is this not working?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |