What about the standard module Text:: Wrap?
Here's a promising-sounding snippet from its docs:
Text::Wrap::wrap() is a very simple paragraph formatter. It formats a single paragraph at a time by breaking lines at word boundaries.
Or if that's not sufficient, Text::Autoformat is capable of more complex things.
In reply to Re: How do I truncate a string while preserving words?
by daviddd
in thread How do I truncate a string while preserving words?
by Cap'n Steve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |