You can also duplicate the STDOUT file handle as described in perlopentut or open.
In reply to Re: Building a log file by moritz in thread Building a log file by Anonymous Monk