I actually don't know how it would compare in terms of speed, but it would use a fair bit less memory. (I just checked the process size of "=> 0" vs. "=> undef", and the latter was about 1 MB smaller on a set of 100K hash keys.)... keys %{ map { $_ => undef } @array }; # not 0
In reply to Re: Re: Unique Array Items
by graff
in thread Unique Array Items
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |