in reply to Re: Re{6): Template Parsing - Finding tag pairs.
in thread Template Parsing - Finding tag pairs.

HTML::Parser doesn't want to parse broken HTML. Like in this example (pseudo tag inside real tag).
use strict; use warnings; my $data = <<DATA; <p <pseudotag>> DATA use HTML::Parser; my $p = new HTML::Parser(); $p->handler('start', \&start_sub, 'text'); $p->report_tags('pseudotag'); $p->parse($data); $p->eof; sub start_sub { my $text = shift; print "$text\n"; }

--
Ilya Martynov (http://martynov.org/)