use warnings; use strict; use Text::Wrap qw(wrap); my $phrase = 'This is a test message with lots of words in it. Tintinabulations!'; $Text::Wrap::columns = 13; my $wrapped = wrap('','',$phrase); print $wrapped;