On Tue, 05 Jul 2011, Barry Brevik wrote:
>
> I am writing an app that has a lot of screen output which it writes to
> STDERR.
>
> The screen output is copious, but I need it right now for debugging; I
> can get rid of it later.
>
> My question is if it is possible to write to STDERR and a named file at
> the same time? I'd rather not go through the code and change every print
> statement.
You could use the `tee` command on the commandline. A pure Perl
implementation is here:
http://search.cpan.org/~dagolden/Tee-0.14/lib/Tee.pm
Or you multiplex the handle at the Perl level with a PerlIO::tee layer:
http://search.cpan.org/~gfuji/PerlIO-Util-0.72/lib/PerlIO/tee.pm
Cheers,
-Jan
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs