my %hash = (); foreach my $i (@userdaten){ my ($ort, $land) = split(/\|\|\|/, $i); $hash{$land}++; }