#test.pl - testfile with the heart of the parser #open the file to search trough unless (open FILE, "<../perl/testproto/Protokoll.log") { die "Cannot open Keywordfile: $!\n"; } #search for the regexp in the file while () { chomp; if (/.*Cl(.*)/) { print $1; } else { print "Keine Treffer.\n"; } }