The parens make it list context, then you take the scalar context from that.my $count = () = $text =~ /$word_regex/g;
In reply to Re^3: Counting the frequency of words in a string
by Eimi Metamorphoumai
in thread Counting the frequency of words in a string
by cez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |