--- name: closedir status: documented runtime: pp source: src/runtime/pp/directory.rs --- ```{index} single: closedir; Perl built-in (pp runtime) ``` # closedir ## Synopsis ```perl closedir($dh); closedir(DH); ``` ## Description Closes a directory handle, releasing its resources. Removes the directory handle from the global `DIRHANDLE_TABLE`. After closing, the handle is no longer valid for `readdir` or other directory operations. Returns 1 on success, `undef` if the handle was not found or already closed. ## See also opendir, readdir