Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Efficient run determination.

by rasta (Hermit)
on Nov 14, 2002 at 10:42 UTC ( #212813=note: print w/replies, xml ) Need Help??


in reply to Efficient run determination.

Not enought laconically, although fast enought:
$string =' aaaa bbbbccccccccbbbb aaaabbbbbcddddddddddddddddddd +d'; $l = length($string); $pp = 0; while ($pp < $l) { $c = substr $string, $pp, 1; if ($string =~ /\G\Q$c\E+/gc) { print "('$c',", $pp, ",",pos($string) - $pp,")\n"; $pp = pos($string); } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2019-06-17 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (78 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!