in reply to Re^2: Counting the frequency of words in a stringin thread Counting the frequency of words in a string
my $count = () = $text =~ /$word_regex/g; [download]