:Tee (was: Phoenix.pm: Meeting 04/19/2001)

Li Guoya-A16499 A16499 at motorola.com
Wed Apr 18 17:22:37 CDT 2001


Hello, IO::Tee is not available to us. I got error message:can't locate IO/Tee.pm in @INC ......

-----Original Message-----
From: doug.miles at bpxinternet.com [mailto:doug.miles at bpxinternet.com]
Sent: Wednesday, April 18, 2001 1:53 PM
To: phoenix-pm-list at happyfunball.pm.org
Subject: IO::Tee (was: Phoenix.pm: Meeting 04/19/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:

http://search.cpan.org/doc/KENSHAN/IO-Tee-0.64/Tee.pm

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
DMCA!



More information about the Phoenix-pm mailing list