The (german) Heise Newsticker does just this. When I look at the page source of a news message I find a tag which isn't part of HTML (<HEISETEXT>) and the content of such a tag (which will probably be ignored completely by browsers) should be available with the HTML::Parser (or HTML::TokeParser?) module(s).
I don't think that you will be able to introduce perl that way. First of all, you could do the same taks in other languages, too. Secondly probably no one will complain about pages not printing nicely. At least unless you're providing a content which usually gets printed.
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).