Thanks, I have learned something. My conception was that STD* descriptors where sort of system constants. Now I see that you can query, rename and store them into other variables.

So storing old STDOUT and resetting when done with all the other stuff works perfect now.

Thanks again,
Matthias


Octavian Rasnita wrote:

Use select() function.
Read perldoc -f select

Teddy

----- Original Message ----- From: "Matthias Kraatz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 27, 2004 12:20 AM
Subject: 're'-redirecting STDOUT back to STDOUT after writing to a file



Hi,

this might be a really stupid question. But, in a cgi-script I wanted to prevent an executable that I call from within the script from dumping output directly to the webpage.

This worked fine with 'open(STDOUT,">something-log.txt")'.

But now I want to write to the webpage again. 'open(STDOUT,">&STDOUT")' does not only look strange, well, it also doesn't work.

Thanks in advance,

Matthias





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to