perl.beginners
[Top] [All Lists]

Re: Strip HTML from files in a directory

Subject: Re: Strip HTML from files in a directory
From: Rob Dixon
Date: Thu, 30 Oct 2008 03:57:50 +0000
Newsgroups: perl.beginners

bdy wrote:
>
> Does anyone know if there's a way to use an HTML stripper in Perl to
> scrub the HTML from all files in a specified directory? If so, would
> you point me in the correct direction.

I would recommend something like

  use HTML::TreeBuilder;

  my $tree = HTML::TreeBuilder->new_from_content($html);
  print $tree->as_text;

but the details depend on your application.

HTH,

Rob

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Strip HTML from files in a directory, Rob Dixon <=