#!/usr/bin/perl -w use strict; use Text::Autoformat; my $rawtext = "foo bar baz" x 100; my $formatted = autoformat $rawtext, { left=>0, right=>60 };