in reply to Finding Redundant values in arrays
If you prefer map you could:
my @test = ("camel","aplaca","peguin","aplaca","monkey","camel","camel +"); my (%duplicate,%test,@redundant); map{exists$test{$_}?$duplicate{$_}=1:$test{$_}=1}@test; @redundant = keys %duplicate; print "@redundant\n";
tachyon
|
|---|