Update:Ignore my code, a far better way to do it was suggested below: @unique{ @a} = 1; @awd2 = keys %unique;
my %unique; foreach my $thingy (@array_with_duplicates) { $unique{$thingy} = 1; } my @array_without_duplicates = keys %unique;
In reply to Find unique elements in an array by jcpunk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |