GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PERLIO::DIR (3)

.ds Aq ’

NAME

PerlIO::dir - Reads directories

CONTENTS

SYNOPSIS



        open my $dirh, <:dir, .;

        binmode $dirh, :encoding(cp932); # OK

        my @dirs = <$dirh>; # added "\n" at the end of the name
        chomp @dirs; # if necessary



DESCRIPTION

PerlIO::dir provides an interface to directory reading functions, opendir(), readdir(), rewinddir and closedir().

However, there is an important difference between :dir and Perl’s readdir(). This layer <B>appends a newline codeB>, \n, to the end of the name, because readline() requires input separators. Call chomp() if necessary.

You can use seek($dirh, 0, 0) for rewinddir().

SEE ALSO

opendir in perlfunc, readdir in perlfunc, rewinddir in perlfunc, closedir in perlfunc.

PerlIO::Util.

AUTHOR

Goro Fuji (X XX) <gfuji (at) cpan.org>

LICENSE AND COPYRIGHT

Copyright (c) 2008, Goro Fuji <gfuji (at) cpan.org>. Some rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PERLIO::DIR (3) 2011-05-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.