#!/usr/bin/perl use Data::Dumper; my %hash = ('Abend' => 'NN', 'Sonne' => 'NN', 'Haus' => 'NN', 'Abendsonne' => 'who knows', ); while () { chomp; $hash{$_}="irgendwas"; } #print Dumper \%hash; for my $word ( keys %hash ) { for my $pre ( keys %hash ) { for my $post ( keys %hash ) { if ( lc $word eq lc "$pre$post" ) { print $word, $/; } } } } __DATA__ ! # $ % & ' ( ) * + +16,4% +23% +5,8% +8,8% , - [...] [...] [...] £ © ± µg/m « »