in reply to Re^2: Can't locate object method "getElementsByClassName" via package "HTML::TagParser::Element"
in thread Can't locate object method "getElementsByClassName" via package "HTML::TagParser::Element"
Making the effort of trimming your code to a more reasonable length and still exhibit the problem might actually help you figuring out by yourself where the error is. And it will make it easier for us to help you if you did not solve the problem yourself in the course of that process.