Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. Perl Pocket Reference > Directory Reading Routines

1.33. Directory Reading Routines


closedir dirhandle

Closes a directory opened by opendir.


opendir dirhandle, dirname

Opens a directory on the handle specified. If dirhandle is an uninitialized scalar variable, a new, unique handle is automatically created.


readdir dirhandle

In scalar context, returns the next entry from the directory or undef if none remains. The entry is the name component within the directory, not the full name.

In list context, returns a list of all remaining entries from the directory.


rewinddir dirhandle

Prepares for reading the first entry again.


seekdir dirhandle, pos

Sets the position for readdir on the directory. pos should be a file offset as returned by telldir.


telldir dirhandle

Returns the position in the directory.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial