a) If you are OK with buffering, you can still use select with a filehandle opened to a \$scalar and filter the scalar before printing. This has the advantage of minimal changes.
b) Personally I'd prefer my own out() routine - closing over a regex var - to replace all needed prints. That'll give you finer control over the single print chunks.
HTH
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
UPDATED: Clarified that these are two different approaches.
In reply to Re: Preprocessing print statements
by LanX
in thread Preprocessing print statements
by mauroid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |