in reply to Changing the name of STDOUT...

Seems to me that you should be able to do this:

*MAILPIPE = *STDOUT; # Point the MAILPIPE symbol to STDOUT's
...before your first print MAILPIPE and it should redirect to STDOUT instead.

Replies are listed 'Best First'.
Re: Re: Changing the name of STDOUT...
by clintp (Curate) on Feb 20, 2001 at 01:52 UTC
    It's not nice to go mucking around in someone else's namespace. Further, when you alias a filehandle, your stdio library is going to get very confused when you seek, tell, close, dup and do other things to the underlying filehandle.

    Use the open(MAILPIPE, ">&STDOUT") or die idiom instead.

Re: Re: Changing the name of STDOUT...
by thor (Priest) on Feb 20, 2001 at 01:19 UTC
    That did the trick! Thanx