-
-
25 May 2011 14:16:31 UTC
- Distribution: PerlIO-Util
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (4)
- Testers (1054 / 1157 / 0)
- Kwalitee
Bus factor: 1- 100.00% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (50.28KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- XSLoader
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
PerlIO::dir - Reads directories
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
andclosedir()
.However, there is an important difference between
:dir
and Perl'sreaddir()
. This layer appends a newline code,\n
, to the end of the name, becausereadline()
requires input separators. Callchomp()
if necessary.You can use
seek($dirh, 0, 0)
forrewinddir()
.SEE ALSO
"opendir" in perlfunc, "readdir" in perlfunc, "rewinddir" in perlfunc, "closedir" in perlfunc.
AUTHOR
Goro Fuji (藤 吾郎) <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.
Module Install Instructions
To install PerlIO::Util, copy and paste the appropriate command in to your terminal.
cpanm PerlIO::Util
perl -MCPAN -e shell install PerlIO::Util
For more information on module installation, please visit the detailed CPAN module installation guide.