How can close and reopen STDOUT in Perl?

Viewed 10612

I'd like to close STDOUT to prevent my code from outputing a particular image that I need for further computation but do not want on my web page.

So i want to close STDOUT, do what I have to do with my code, then reopen STDOUT to output stuff to a web page. (Not to a file)

What I tried is:

    close STDOUT;
    # my code here
    open STDOUT;

This doesn't work...

Thanks

6 Answers
Related