You can use HTML::TokeParser::Simple, which does exactly what you need (you can get the value of any attribute of a given tag).
This module is actually an interface to HTML::TokeParser. It's simpler in the sense that it's easier to fetch the data about the tags: you have many methods using which you can avoid to parse the TokeParser's output.