if ( ref( $fd ) ) { if ( $fd->isa( 'IO::Handle' ) or $fd->isa( 'GLOB' ) ) { $status = $handle->fdopen( $fd, @_ ); } else { $handle = $fd; } }