in reply to Changing the name of STDOUT...
I'll write this really quickly so you'll get the warning before anyone suggests that you do *MAILPIPE= *STDOUT.
Doh! ;)
But seriously, *MAILPIPE= *STDOUT seems to have become a common idiom, but I don't like it much (I used it once in a very special situation and even then I commented the code to say it was a "last resort" and likely still had problems).
One problem in this particular case is that when your program gets to the close MAILPIPE, it will actually be closing STDOUT and any further output to STDOUT will be lost.
What I suggest you use instead is:
- tye (but my friends call me "Tye")open( MAILPIPE, ">&STDOUT" ) or die "Can't dup STDOUT to MAILPIPE: $!\n";
|
|---|