develooper Front page | perl.libwww | Postings from August 2016

Re: Facing problem with HTML::Parser

Thread Previous
Olaf Alders
August 12, 2016 19:00
Re: Facing problem with HTML::Parser
Message ID:

> On Aug 11, 2016, at 1:44 AM, Shivani Palle <> wrote:
> Hi,
> I am facing one issue while using HTML::Parser. Please help me.
> Issue:
> I am using HTML::Parser to parse all the HTML files through out the directories to get hard coded strings from the html files(text between the tags).

This does not directly answer your question, but you can solve the same problem with HTML::Restrict (disclaimer: am author of said module):

use HTML::Restrict;
my $hr = HTML::Restrict->new();
# use default rules to start with (strip away all HTML)
my $processed = $hr->process('  <b>i am bold</b>  ');
# $processed now equals: 'i am bold'

Hope this helps,


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About