use strict; use HTML::HeadParser; $p = HTML::HeadParser->new; $p->parse_file('index2.html'); # and print "not finished"; print "Title is ", $p->header('Title');