Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: how to count the number of repeats in a string (really!)

by lodin (Hermit)
on Nov 15, 2007 at 00:00 UTC ( [id://650875]=note: print w/replies, xml ) Need Help??


in reply to Re^4: how to count the number of repeats in a string (really!)
in thread how to count the number of repeats in a string (really!)

The kramba subroutine suffers from an accumulating %count. It can be fixed by doing %count = () and returning { %count } (a copy of %count); making %count global and localizing it; or my favourite: write the recursive subroutine as an anonymous closure in kramba.

lodin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-23 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found