Perl: the Markov chain saw | |
PerlMonks |
Re^2: Extract Duplicates by one linerby dmorelli (Scribe) |
on Mar 04, 2005 at 15:56 UTC ( [id://436615]=note: print w/replies, xml ) | Need Help?? |
Getting golfy over here, but you don't even need the $_ if part:
@a=qw/foo bar bar baz/; print join ", ", grep { !$h{$_}++ } @a;
In Section
Seekers of Perl Wisdom
|
|