my @test = qw( camel aplaca peguin aplaca monkey camel camel ); my %test; $test{$_}++ for @test; my @redundant; while (my($k,$v) = each %test) { push @redundant, $k if $v > 1; } print "@redundant\n";
In reply to Re: Finding Redundant values in arrays
by wog
in thread Finding Redundant values in arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |