This has a few benefits:my (@items, @unique, %seen); for (@items) { push @unique, $_ unless $seen{$_}++; }
In reply to Re: To Hash or to Array--Uniqueness is the question.
by kbrint
in thread To Hash or to Array--Uniqueness is the question.
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |