Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: counting overlapping patterns

by betterworld (Curate)
on Feb 19, 2005 at 02:43 UTC ( #432618=note: print w/replies, xml ) Need Help??


in reply to counting overlapping patterns

Why not let Perl do the incrementing itself?

$count = () = "AAAA" =~ m/(?=AA)/g;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://432618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2019-11-14 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (77 votes). Check out past polls.

    Notices?