It can be hard to make such script, because forums are made differently and the structure of the underlying HTML is not necessarily the same from forum to forum. I would instead concentrating on the forums providing RSS feeds. In that way you'll only have to care about a single structure.
If you don't want to make a RSS parser yourself, you can use an already existing one. You may want to look into
XML::RSS and eventually XML::RSS::Parser::Lite if you want a simpler interface.