in reply to Forcing a string with no spaces to wrap to fit on the screen

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;