Re: FormatText help

Gisle Aas (gisle@aas.no)
06 Jan 1998 09:58:25 +0100


Jimmy Patrick <jimmyp@marimba.com> writes:

> I'm using libwww-perl 5.18. And trying to do something like this:
> #
> use LWP::Simple;
> use LWP::Parse;
> print OUT parse_html(get ($base.$url))->format;
> #
> 
> This all works, but I want to format my text to 35 columns, not 72?
> 
> I noticed in ~/libwww-perl-5.18/lib/HTML/FormatText.pm 
> 
> that the default was 72 columns, can I specify rightmargin and leftmargin?
> if so, how would I do that? 

Try this:

use LWP::Simple;
use HTML::Parse;
use HTML::FormatText;

print HTML::FormatText->new(leftmargin => 0,
                            rightmargin => 35)
    ->format(parse_html(get "http://furu/"));

-- 
Gisle Aas