my $str = "The quick brown fox jumped over the lazy dog"; my @the = ( $str =~ /\bthe\b/gi ); print scalar @the, $/;