dmuz has asked for the wisdom of the Perl Monks concerning the following question:

How do I do this: $var=STDOUT; open(LOG,$var); print LOG;

Edit by tye

Replies are listed 'Best First'.
Re: How do I do this: code$var=STDOUT; open(LOG,$var); print LOG;/code
by japhy (Canon) on May 13, 2001 at 09:02 UTC
    I think you want:
    open DUP, ">&STDOUT"; print DUP "this goes to STDOUT, really\n"; close DUP;
Re: How do I open another handle to STDOUT
by dailylemma (Scribe) on May 13, 2001 at 16:09 UTC
    It seems that

    open( LOG, '>-'); print LOG;
    does the trick, although i'm not sure how to do
    this for a general filehadle.
Re: How do I open another handle to STDOUT
by lindex (Friar) on May 14, 2001 at 00:22 UTC