my $data = do {local $/; }; my $count = () = $data =~ m/\bthe\b/ig; print $count; __DATA__ Then I played with the rabbit and the thesaurus. (2) It was quite the experience. (1) Seriously, the bunny was the coolest pet in the whole zoo. (3)