use Text::Format; my $text = 'some text string of words, possibly having more than 990 characters ...'; my $text_obj = Text::Format->new( { columns => 990, firstIndent => 0, bodyIndent => 0, } ); $text = $text_obj->format($text);