in reply to Tacking a function on to STDOUT?

You're kind of suggesting the right solution already. The best way to do this is to make a  sub printfiltered {} that filters the text you want to print before printing it to STDOUT. This leaves you with the flexibility of still printing the 'unfiltered' way to STDOUT by just calling print.
Doing this the true object oriented way, one would override the print method but i'm not sure if perl allows you to do that. (pretty sure it does not actually)
There *might* be a way of redirecting STDOUT to a variable and then have a separate process checking that variable every other millisecond to filter it and print it to STDOUT, but let's keep things simple and maintainable shall we ?

Jorg

"Do or do not, there is no try" -- Yoda