in reply to Re: Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
in thread Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
curiously, (the pure-perl version of) List::MoreUtils::uniq uses
rather thanmap { $h{$_}++ == 0 ? $_ : () } @_;
i wonder, a simple preference or are there interesting micro-optimizations in the map verison?grep { !$h{$_}++ } @_;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
by dragonchild (Archbishop) on Nov 30, 2007 at 13:36 UTC |
In Section
Seekers of Perl Wisdom