I have played around with your program a little bit, here is my actual version, perhaps it is usefull for you:
#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
my $dir = '\webdirectory';
my $nameOne = 'alpha beta';
my $nameTwo = 'charlie';
my @pages;
sub mySub {
return if -d $File::Find::name;
return if $File::Find::name !~ /\.html$/;
my $text;
open (IN, $File::Find::name) or die "Can't open '$File::Find::name
+': $!\n";
{
local $/; # Slurp-Mode
$text = <IN>;
}
close IN or die $!;
if ($text !~ m/\Q$nameOne\E/ and $text !~ m/\Q$nameTwo\E/)
{
push @pages, $File::Find::name;
}
}
find( \&mySub, $dir );
print "$_\n" for @pages;
I'm sorry for not using File::Slurp here as suggested, but its not installed here until now.