my @txt = qx(dir /B *.eit); foreach (@txt) { chomp $_; my $ctxtf = qx(type $_); $ctxtf =~ /.*\x{00f8}(1?[0-9])\. findewort.*/; print "\n==> Ergebnis: ".$1."\n"; }