http://www.perlmonks.org?node_id=291661


in reply to Perl Idioms Explained - @ary = $str =~ m/(stuff)/g

Is there an "... Explained" that covers the extension of this to:
$howmanytimes = @ary = $str =~ m/(stuff)/g; # or perhaps better as $howmanytimes = () = $str =~ m/stuff/g;
which then goes to show you don't need the capturing parentheses in the match and .... I'll shut up.