in reply to HTML::Parser, get rid of JavaScript
Then add a handler to detect the tags <SCRIPT> and </SCRIPT>. Turn off $ok_to_add_text when you see the first tag and turn it back on when you see the second one. You can also use this approach to avoid getting the CSS at the beginning (i.e. the text that appears in the STYLE tag.)my $ok_to_add_text; ... sub text_handler { ... if ($ok_to_add_text) { push ... } }
|
|---|