in reply to !Overriding Builtin print
You are not supposed to override print (that'd be far too global to be usefull anyway), but to create a class and tie a FILEHANDLE to it. If you then select that handle your print()s will do whatever you want at all.
See perldoc perltie and perldoc Tie::Handle. There are two different classes for tied FILEHANDLEs within Mail::Sender is you wanted more examples.
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature