RosettaCodeData/Task/Remove-duplicate-elements/Perl/remove-duplicate-elements-2.pl

3 lines
70 B
Perl
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
my %seen;
my @uniq = grep {!$seen{$_}++} qw(1 2 3 a b c 2 3 4 b c d);