Re: HTML 2 Text Script
John Powell (jpowell@gpfn.sk.ca)
Fri, 14 Jan 2000 13:01:54 -0600 (CST)
Thanx so much, that showed the problem (filename was incorrect)!
-John
On 14 Jan 2000, Gisle Aas wrote:
> Date: 14 Jan 2000 14:54:56 +0100
> From: Gisle Aas <gisle@aas.no>
> To: John Powell <jpowell@gpfn.sk.ca>
> Cc: libwww@perl.org
> Subject: Re: HTML 2 Text Script
>
> John Powell <jpowell@gpfn.sk.ca> writes:
>
> > I am a PERL newbie and I found a PERL snipplet for converting
> > HTML2TEXT but I am having trouble getting it running:
> >
> > >cat html2txt.pl
> >
> > >#!/usr/bin/perl
> > >
> > >package html2text ;
> > >
> > >require HTML::Parse;
> > >require HTML::FormatText;
> > >
> > >$htmldata = HTML::Parse::parse_htmlfile('hbccheck.html');
>
> Try to add this here:
>
> die "Can't open file" unless $htmldata;
>
> > >$formatter = new HTML::FormatText;
> > >$textdata = $formatter->format($htmldata);
> > >print $textdata;
> >
> > When I run it I get:
> >
> > >html2txt.pl
> >
> > >Can't call method "traverse" without a package or object reference at
> > >/usr/local/lib/perl5/site_perl/HTML/Formatter.pm line 94.
> >
> > Any ideas as to what I am missing?
>