in reply to redirecting STDERR, then back again

Here's what ended up working:
open(OLDERR, ">&STDERR"); open(STDERR, ">>/tmp/tmp.spderr") or die "Can't dup stdout"; select(STDOUT); $| = 1; # make unbuffered print OLDERR ""; #this fixed an error about OLDERR not being used ## do my stuff here. close(STDERR); open(STDERR, ">&OLDERR");
As danger said, this is in perlfunc:open.

thanks,

melguin