IO::Tee (was: Meeting 04/19/2001)

Doug Miles doug.miles at
Wed Apr 18 15:53:04 CDT 2001

Li Guoya-A16499 wrote:
> Doug:
> I have a problem on perl:
> I write sth to a filehandle: print $handle "my data\n";
> then $handle = new IO::File ">$file1"; #write to a file named $file1
> Doug: the question is : how can I write $handle to STDOUT at the same time??
> That means: write "my data" to a file and to the STDOUT??
> Thank you.
> guoya

You might want to look at IO::Tee:

I haven't used it before, but it looks like it should do what you want. 
CPAN is your friend. :)

- Doug

Encrypted with ROT-26 - all attempts to decrypt are illegal under the

More information about the Phoenix-pm mailing list