Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

DirHandle (3)

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

Perl Programmers Reference Guide                                  DirHandle(3)



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.



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+-----------------------+
       |ATTRIBUTE TYPE |   ATTRIBUTE VALUE     |
       +---------------+-----------------------+
       |Availability   | runtime/perl-526      |
       +---------------+-----------------------+
       |Stability      | Pass-through volatile |
       +---------------+-----------------------+
NOTES
       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://www.cpan.org/src/5.0/perl-5.26.3.tar.bz2

       Further information about this software can be found on the open source
       community website at http://www.perl.org/.



perl v5.26.3                      2018-03-01                      DirHandle(3)