my @list = (1,1,4,7,1,4,3); my $anz = grep{ $_ == 4 }@list; print "die 4 kommt $anz mal in der Liste vor\n";