#!/usr/bin/perl -w use strict; my @zufallszahlen; #zufallszahlen hinzufügen for (0..9) { push @zufallszahlen, int(rand(101)); #print $_+1 .") $zufallszahlen[$_]\n"; } print "-"x30 ."\n"; #zahlen abgleichen und ausgeben for my $curr (@zufallszahlen) { my $i = 0; for(@zufallszahlen) { $i++ if ($curr == $_); } print "$curr kommt $i mal vor.\n"; }