 
Provides methods for accessing Perl's directory functions, avoiding namespace pollution. Creates anonymous glob to hold a directory handle and closes the dirhandle automatically when the last reference goes out of scope. The following methods are provided.
| new | 
$dh = new DirHandle [dirname]
Constructor. Creates a new directory handle. The optional directory name, dirname, defaults to the current directory.
| read | 
$dh->read( )
Reads directory entries. Equivalent to the readdir function. In scalar context, reads the next directory entry; in list context, reads all entries.
| rewind | 
$dh->rewind( )
Sets current position to beginning of directory; equivalent to the rewinddir function.
 
Copyright © 2002 O'Reilly & Associates. All rights reserved.