my $str = "The quick brown fox jumps over the lazy dog"; my $count = () = $str =~ m/(the)/ig; print $count;