Movatterモバイル変換


[0]ホーム

URL:


functions /readdir
(source,CPAN)
You are viewing the version of this documentation from Perl 5.10.0.View the latest version
#readdir DIRHANDLE

Returns the next directory entry for a directory opened byopendir. If used in list context, returns all the rest of the entries in the directory. If there are no more entries, returns an undefined value in scalar context or a null list in list context.

If you're planning to filetest the return values out of areaddir, you'd better prepend the directory in question. Otherwise, because we didn'tchdir there, it would have been testing the wrong file.

opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";@dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR);closedir DIR;

Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.

The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.


[8]ページ先頭

©2009-2025 Movatter.jp