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

[email protected] (Steven Schubiger) Fri, 1 Apr 2005 01:20:06 +0200 (CEST)
Newsgroups perl.perlfaq.workers
Message-ID <[email protected]>
On 31 Mar, _brian_d_foy wrote:

:    my @unique = grep { ! $Seen{ $elem }++ } @array;

Shouldn't it read $Seen{ $_ } instead?

Steven Schubiger