# find lines with keywords my $i; foreach $i (@keywords) { ## -- now LINE 41 -- if($line =~ m/$i/i) { # copy found lines to the found lines array push @found , $line; } }