>Have you ever wanted to count the number of matches of a patten? s///g >returns the number of matches it finds. m//g just returns 1 for matching. >Counts can be made using s//$&/g but this is wastefull, or by putting some >counting loop round a m//g. But this all seams rather messy. It's really much easier than all that: $count = () = $string =~ /pattern/g; --tom
- RFC 110 (v3) counting matches Perl6 RFC Librarian
- Re: RFC 110 (v3) counting matches Jonathan Scott Duff
- Re: RFC 110 (v3) counting matches Tom Christiansen
- Re: RFC 110 (v3) counting matches Jarkko Hietaniemi
- Re: RFC 110 (v3) counting matches Jarkko Hietaniemi
- Re: RFC 110 (v3) counting matches Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Nathan Wiger
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Damien Neil
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting matches Philip Newton
- Re: RFC 110 (v3) counting matche... Mark-Jason Dominus
- Re: RFC 110 (v3) counting ma... Bart Lateur