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
>Boston-pm@mail.pm.org
>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
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to