open(O,">","/dev/null"); select O; my $fh = select STDOUT; warn "fileno is ",fileno($fh),"\n"; select $fh; print 'text'; __END__ fileno is 3