Do you know why it was written the way it was
I don't. What I don't understand is why it uses numerical comparison and map instead of the plain and simple
which, at least on Perl 5.8.8, is faster. (Notably faster if there are many identical elements.)sub unique { my %h; grep !$h{$_}++, @_; }
Any enlightenment would be appreciated.
lodin
In reply to Re^3: Module Bloat and the Best Solution
by lodin
in thread Module Bloat and the Best Solution
by KurtSchwind
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |