You want 3/4ths of the operator which shall not be named and some extra parens.
if( 2 == ( ()= $outs =~ m|A|gs ) ){ print "exactly 2 matches\n" }
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: most terse regex match count
by Fletch
in thread most terse regex match count
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |