# $word is direct user input my $count = () = $page_text =~ m/\b$word\b/gi;