$count = () = "AAAA" =~ m/(?=AA)/g;
In reply to Re: counting overlapping patterns by betterworld in thread counting overlapping patterns by Anonymous Monk