close(STDERR); open(STDERR, '>', \my $BUF) or die $!; warn "hey there"; $BUF=~/hey there/ or die;