my %frau; $frau{ $_ }++ for @frau; my $paare; for my $key (@mann) { if ($frau{ $key }-- > 0) { $paare++; say "Paar $key"; } } say "Paare: $paare";