in reply to Efficient run determination.

And here's a simple while (//g;) loop version:
use Data::Dumper; my $string =' aaaa bbbbccccccccbbbb aaaabbbbbcdddddddddddddddd +dddd'; my (@res, $i); $i = 0; while ($string =~ /(.)\1*/g) { push (@res, [$1, $i, pos($string)-$i]); $i = pos($string); } Dumper (\@res);

Dingus


Enter any 47-digit prime number to continue.