Perl: HTML::Parser
HTML::Parser
The HTML::Parser class defines many abstract methods, here are a few useful ones:
start() called when a start tag is found
end() called when an end tag is found
text() called when plain text is found
comment() called when comments are found
Once you have overridden the methods you want to use, call one of these methods on your parse object:
parse($string)
parse_file($filename)