in reply to Re: 8 in a line...
in thread 8 in a line...

print join qq(\n), $str =~ /.{8}/g, qq(\n);

In the general case you need an /s modifier in that regex (but it's hard to tell from heidis post if you need in this specific case).