my $anzahl_fehler = 0; $anzahl_fehler += $_ for(values(%errors)); print "Es gab $anzahl_fehler Fehler\n";