in reply to Search and replacing across 500,000 HTML documents
Just check using the get_text method:my $p = HTML::TokeParser->new(\$page_content);
Inside some while loop... You can use "get_tag" before and make sure to replace only in tags that you know wrap plain text (div, p, etc.).my $text = $p->get_text; if ($text =~ /$my_name/) {#stuff...}
|
|---|