in reply to Which modules needed?
You can use HTML::Head Parser from HTML::Parser to extract tags inside head section. If you need some more specific parser, there are many solutions on CPAN.
Ciao, Valerio