Have you tried HTML::Parser?
If you'd like quick and dirty hacks instead, try using Text::Wrap setting the columns to 40 and then splitting by newlines?
In reply to Re: string splitting with spaces and HTML
by rrwo
in thread string splitting with spaces and HTML
by mark0ls0n
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |