in reply to Split a string into items of constant length

A simple regex should work fine. No need for anything complicated.
my $data = 'a(b)cd(e)f'; my @chunks = $data =~ /.{5}/g; print "@chunks";

Change the value in the regex for a different number of chars.