in reply to Perl Idioms Explained - keys %{{map{$_=>1}@list}}
Just as memory hungry, still not order preserving, and still broken with regards to undefined values, but faster approach:
And if you want to wrap it up without "leaking" lexicals:my %seen; @seen{@list}=(); my @uniq = keys %seen;
This approach does not (explicitly) iterate - more of the data structure setup work is done implicitly by perl.my @uniq = do { my %seen; @seen{@list}=(); keys %seen; };
Makeshifts last the longest.
In Section
Meditations