Be aware that IO::Tee has limitations.  It only works for output that
goes through Perl's IO system.  In particular if your program makes
a system call, the child process will NOT see the tee.

Cheers,
Ben

On 5/9/05, Duane Bronson <[EMAIL PROTECTED]> wrote:
> If it's Unix-only, you can open ("tee output.log |") and write to that.
> 
> And search.cpan.org tells me there's IO::Tee
> 
> Or you could use something like log4perl which I think allows you to
> configure multiple "appenders" of which one can be stdout and another
> can be a log file.  That might be overkill, though.
> 
> 
> 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.
> >
> >Thanks,
> >
> >-Nilanjan
> >
> >_______________________________________________
> >Boston-pm mailing list
> >[email protected]
> >http://mail.pm.org/mailman/listinfo/boston-pm
> >
> >
> >
> 
> --
> Sincerely       *Duane Bronson*
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> http://www.nerdlogic.com/
> 453 Washington St. #4A, Boston, MA 02111
> 617.515.2909
> 
> 
> _______________________________________________
> 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