for my $word ( split /\s+/, $text ) { for my $pre ( keys %hash ) { for my $post ( keys %hash ) { #- Kleinschreibung my $lc_word="\L$word"; my $lc_komposit="\L$pre$post"; if ( $lc_word eq $lc_komposit ) { print $word, $/; } } } }