Thanks to all who responded. IO::Tee seems to be the right solution.

-Nilanjan

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gyepi SAM
Sent: Monday, May 09, 2005 11:35 AM
To: Palit, Nilanjan
Cc: Boston.PM
Subject: Re: [Boston.pm] Simultaneous redirect to STDOUT & File?

On Mon, May 09, 2005 at 07:48:09AM -0700, Palit, Nilanjan wrote:
> I want to redirect print output to both stdout & a file at the same
> time: I can think of writing a sub that executes 2 print statements
(one
> each to stdout & the filehandle), but I was hoping someone has a more
> elegant solution.

Your solution is basically correct. The devil, however, is always in the
details and IO::Tee should take care of those for you.

-Gyepi
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to