open my $fh, '>', \my $buf or die $!; select $fh; print "hallo "; print "welt"; warn "<<$buf>>";