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


in reply to regexp match count

my $count =()= ($str =~ /ban/g);
This is the famous =()= goatse "secret operator", nicely explained here (along with Perl's other "secret operators").