I found a regular expression that is supposed to do this, but it's not working.
$body =~ s/.{,70} /$&\n /sg;
This is supposed to insert a new line after 70 occurrances of the same character, but it's not working for me. Can somebody help?
Could you provide further details, such as:
If its too big to post, feel free to email/sticky me, and we'll post back the solution later.
Shawn
$body =~ s/\cM//g;
$body =~ s/\n\n/<p>/g;
$body =~ s/\n/<br>/g;
$body =~ s/ / /g;
$body =~ s/\¦/\|\;/g; #escape pipes
$body =~ s/\S{70}/$&<br>/sg;
After this happens, the $body variable is written into a pipe delimited file along with several other variables. Once this happens, the file is read and the contents are displayed as HTML for the user to see. Opening the delimited file, I can find no br's in there, so it looks like nothing happened. All I saw was a whole bunch of the same character in one long string.
Since no good solution seems clear, maybe I will message you privately.