Re: Strip HTML from files in a directory



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
.



Relevant Pages

  • Strip HTML from files in a directory
    ... 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? ...
    (perl.beginners)
  • Re: run perl program when there is new file?
    ... I need to write a perl program to store some text output files ... generated from the other programs into a MySQL database. ... check every minutes if there is new files in the specified directory ... If you can't play with the crontab, maybe you can add the SQL stuff at ...
    (comp.lang.perl.misc)
  • Re: Using modified date
    ... tyler75 wrote: ... > I would like to make a list of files in a specified directory using ... use Perl; ...
    (comp.unix.shell)
  • RE: Strip HTML from files in a directory
    ... 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? ...
    (perl.beginners)