No such thing as a small change | |
PerlMonks |
Re: inserting html tags after X charactersby Rich36 (Chaplain) |
on Nov 01, 2002 at 17:52 UTC ( [id://209804]=note: print w/replies, xml ) | Need Help?? |
A simper option instead of using regular expressions to insert the breaks is to use Text::Wrap. Once you've got the string of text from the HTML tags, use Text::Wrap (setting the columns to 80 characters) on the text. You could then substitute the "\n"'s for "<br>\n" for the HTML line breaks in the string. «Rich36»
In Section
Seekers of Perl Wisdom
|
|