Help for this page
my $file = join '', @file; # put it all in a single scalar if ($file =~ m/(?:what you want to find.*){6}/) { print "'what you want to find' was in the file at least 6 times.\n"; }
my $count; while (<$fh>) ... { print "found 'what you want to look for' at least 6 times in the fil +e.\n"; }