I believe this is answered on this site, but consider just replacing lengthy chunks with that chunk plus a newline character. Or <br /> tags if this is html.
$string =~ s/([^\n]{80})/$1\n/mg;
In reply to Re: Forcing a string with no spaces to wrap to fit on the screen
by pbeckingham
in thread Forcing a string with no spaces to wrap to fit on the screen
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |