develooper Front page | perl.beginners | Postings from August 2009

Re: removing a 'tee'd file handles going forward

Thread Previous
Tony Esposito
August 26, 2009 11:54
Re: removing a 'tee'd file handles going forward
Message ID:
Ok.  I misunderstood.  Thought - incorrectly - that STDOUT and STDERR were somehow 'joined' by the 'tee' operation.  Once again, my mistake.  Thx.

From: Jenda Krynicky <>
To: Tony Esposito <>
Cc: Beginners Perl <>
Sent: Wednesday, 26 August, 2009 13:51:03
Subject: Re: removing a 'tee'd file handles going forward

From: Tony Esposito <>
> Agreed.  But the program flow would be such (pseudo-code):
> (1) print STDOUT
>     print STDERR
> (2) now print to both in one print statement
> (3) now go back to
>     print STDOUT
>     print STDERR
> I want to switch back-and-forth between being able to print to STDOUT,
> STDERR with one 'print' statement and then back ...

I said you can! And you do not have to destroy the tee and then
create it again. Once you create the tee you can print to STDOUT,
STDERR or the teen any time you want, as many times you want and in
any order you want.

===== === =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
    -- Terry Pratchett in Sourcery

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About