Re: perlfaq4: How can I remove duplicate elements from a list or array?

[email protected] (_brian_d_foy) Fri, 01 Apr 2005 13:23:58 -0600
Newsgroups perl.perlfaq.workers,perl.documentation
Message-ID <010420051323582506%[email protected]>
In article <[email protected]>, Keith Ivey <[email protected]>
wrote:

> _brian_d_foy wrote:


> >    # or a foreach: $hash{$_} foreach ( @array );

> That last should be

>      $hash{$_} = 1 foreach @array;

> maybe?  As it is, it doesn't create the hash elements.

fixed. Thanks :)

-- 
brian d foy, [email protected]