in reply to formatting web pages for a printer

My advice is to generate a very simple "HTML light" version: no nested or fixed width tables, no CSS, no JavaScript, no backgrounds or colors of any kind, and perhaps not even images. Also strip it to the basic content, but add information that otherwise might be lost (e.g. current URL). That's the best you can do to work with any browser, printer, OS etc.

Working with XSLT most of my time (which is rather horrible, because you usually end up duplicating code, typing tons of error-prone lines and creating maintenance chaos), I unfortunately can't tell you the way to do it in perl, but surely some fellow monks in here can.