On Jul 24, 5:57 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> bdy wrote:
>
> > My code is as follows:
>
> > use strict; use HTML::Stripper;    useLWP::Simple qw( get );      my
> > $stripper = HTML::Stripper->new(        skip_cdata => 1, strip_ws => 0  );  
> >       my
> > $page_html = get(http://www.google.com/about.html); open(FILE,  ">
> > http___www.google.com.html");   print FILE $stripper->strip_html
> > ($page_html);      close(FILE);
>
> > Unfortunately, I'm not sure how I would run the stripperwithoutLWP.
> > What I would like to accomplish is running a file through
> > HTML::Stripper apart fromLWP.
>
> > Here's what I've produced so far:
>
> >   use strict;
> >   use HTML::Stripper;
>
> >   my $stripper = HTML::Stripper->new(
> >       skip_cdata => 1, strip_ws => 0
> >   );
>
> >   my $page_html = 'H:\test-r-get\google.html';
> >   open(FILE,  ">   google.txt");      print FILE $stripper->strip_html
> > ($page_html);      close(FILE);
>
> > Unfortunately, this produces a blank text file.
>
> useLWP::Simple;
> my $page_html = get('file://localhost/H:/test-r-get/google.html');
>
> ;D
>
> Rob- Hide quoted text -
>
> - Show quoted text -

Thanks; it works. Does the pod for LWP or HTML::Stripper contain
anything about scrubbing HTML from all HTML files in a file directory?
I couldn't find anything.

Thanks,


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to