in reply to How can I split a line on word boundaries closest to a certain length?

The Text::Wrap module might prove useful to you. Your code might look like this:
use Text::Wrap qw(wrap 140 'wrap'); @strings = split/\n\n/, wrap($text);
  • Comment on Re: How can I split a line close to a certain length, but on a word boundary?
  • Download Code