Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

closedir

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.

Synopsis

closedir($dh);
closedir(DH);

See Also

opendir, readdir