$quelldatei = $ARGV[0] or die 'Bitte Quelldatei angeben!'; open "Q", "<$quelldatei" or die "Datei $quelldatei wurde nicht gefunden"; foreach () { push @array, $_; } $hash{$_}++ for @array; @sortiert = map { $_->[0] } sort { $b->[1] <=> $a->[1] } map { ["$_ $hash{$_}mal", $hash{$_}] } (keys %hash) ; print join ("\n",@sortiert);