use Text::Format; my $in_string = q(It should be clear to any frequent air passenger that in order to reach one city from another, the cost of the shorter flight may be more than the cost of longer flights. In other words, it may pay you well to cool your heels in an airport waiting for a connecting flight rather than take a more direct flight or one in which the connecting time is shorter. For example, consider the following flight schedule.); $text = Text::Format->new({ text => [$in_string], columns => 50, justify => 1, firstIndent => 0, } ); print $text->format;