On Tue, Sep 28, 2010 at 08:10:30AM -0700, Richard Green wrote:

> What would be the quickest , easiest way to remove duplicates from a hash?
> Any suggestions are muchly appreciated. Thanks

I presume you mean duplicate values, because hashes don't have duplicate keys.
Do you care which values get removed?  If not, then:

   %x = reverse %x; %x = reverse %x;

will do the trick.

That's the quickest and easiest method according to some criteria, anyway.

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to