Skip to Main Content
Perl Pocket Reference, 5th Edition
book

Perl Pocket Reference, 5th Edition

by Johan Vromans
July 2011
Intermediate to advanced content levelIntermediate to advanced
104 pages
2h 14m
English
O'Reilly Media, Inc.
Content preview from Perl Pocket Reference, 5th Edition

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 9781449311186Errata Page