Perl Programming/Keywords/opendir

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: open Keywords Next: or

The opendir keyword[edit | edit source]

opendir opens a directory called EXPRESION for processing by closedir, readdir, rewinddir, seekdir, and telldir. Returns true, if successful. DIRHANDLE may be an expression with the value of an indirect dirhandle, which is usually the real dirhandle name. If DIRHANDLE is an undefined scalar variable (or array or hash element), the variable is autovivified by assigning a reference to a new anonymous dirhandle. DIRHANDLEs have their own namespace separate from FILEHANDLEs.

Syntax[edit | edit source]

  opendir DIRHANDLE, EXPRESION
chdir closedir mkdir opendir readdir rewinddir rmdir seekdir telldir
Previous: open Keywords Next: or