DirHandle - perldoc.perl.org

Perl Programming Documentation
Download Perl
Explore

Manual

- Overview
- Tutorials
- FAQs
- History / Changes
- License

Reference

- Language
- Functions
- Operators
- Special Variables
- Pragmas
- Utilities
- Internals
- Platform Specific

Modules

- A • B • C • D • E
- F • G • H • I • L
- M • N • O • P • S
- T • U • X

Tools

- Preferences

# DirHandle

Perl 5 version 26.0 documentation
Go to top
Show page index • Show recent pages
Recently read

# DirHandle

- NAME
- SYNOPSIS
- DESCRIPTION

# NAME

DirHandle - supply object methods for directory handles

# SYNOPSIS

        use DirHandle;    $d = DirHandle->new(".");    if (defined $d) {        while (defined($_ = $d->read)) { something($_); }        $d->rewind;        while (defined($_ = $d->read)) { something_else($_); }        undef $d;    }

# DESCRIPTION

The `DirHandle` method provide an alternative interface to the opendir(), closedir(), readdir(), and rewinddir() functions.

The only objective benefit to using `DirHandle` is that it avoids namespace pollution by creating globs to hold directory handles.

Page index

- NAME
- SYNOPSIS
- DESCRIPTION