in reply to Re: finding number of contiguous letters
in thread finding number of contiguous letters
The while loop worked fine with substring.
no need for such a complex route when using substr; map is your friend:
my @parts = map { substr $str, $_, 3 } 0..length($str)-3;
In Section
Seekers of Perl Wisdom