I can only add that it's a bad idea to use $&, because it will slow down regex matches in your whole script, and even in modules included from your script.
Use $var =~ s/(\S{$last_length})/$1\n/sg; instead.
In reply to Re: Breaking up a really long string
by moritz
in thread Breaking up a really long string
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |