use strict; use warnings; my @strings = ( "APPCRASH.", "he protected system file.", "EMET_DLL Module logged the following event:.", "your virus/spyware.", "A new process has been created\..", "A service was installed in the system\..", "A scheduled task was created\..", "Logon Type:[\\W]*(3|10).", "\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run.", "service terminated unexpectedly\..", "service was successfully sent a.", "service entered the.", "service was changed from." ); while (defined (my $info = )) { for my $string (@strings) { chomp $info; if ($info =~ /\Q$string\E/) { print "Line # $.: '$string' --> '$info'\n"; } } } __DATA__ APPCRASH. nothing to see here Part sentence: service entered the.