my $url = "http://www.foo.com/"; my $cols = "70"; use HTML::TreeBuilder; use HTML::FormatText; use LWP::Simple; my $content = get $url; my $html = new HTML::TreeBuilder; $html->parse($content); my $f = new HTML::FormatText(leftmargin => 0, rightmargin => $cols); print $f->format($html);