in reply to Re^2: tee and log files
in thread tee and log files

There is a solution to that, simply copy what File::Tee is doing :)

See also perltie and Tie::Handle and IO::Tee

See also Yes, even you can use CPAN, Top 11 (GOOD) reasons not to use someone else's Modules, Top Seven (Bad) Reasons Not To Use Modules