Update: removed unnecessary parens. I don't know what I was thinking when I put them in.$t =~ s/(.{39}[^\s]*)\s+/$1\n/; $t =~ s/([^\n]{60}[^\s]*)\s+/$1\n/g;
In reply to Re: adding newline to middle of a string cleanly
by Roy Johnson
in thread adding newline to middle of a string cleanly
by tbone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |