Help for this page
my @array = qw/A B C B D B D/; my $c=1; ... $c= scalar grep { $_ eq $k } @array; print "There are $c element(s) of $k\n"; }