in reply to Split a string into items of constant length

Another solution is to use magical values for open and $/:
my $a = 'a(b)cd(e)fg(h)ij(k)l'; open IN, '<', \$a or die "Reading string: $!\n"; $/=\5; my @s = <IN>; print map "$_\n", @s;
(You need to be using a modern perl. I think 5.8.x)

Caution: Contents may have been coded under pressure.