X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=048ecfb4bab33e7f39618c155ed1111dc2752a1b;hb=80a5d8e74b5512d4ab704d0e83466ae41247ce55;hp=d20851f53f2409db3879cd5c8c117c0367bc8fed;hpb=004283b80f6094bb85aba6f48a74e3c5c34ea24f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d20851f..048ecfb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3024,12 +3024,18 @@ them, and automatically close whenever and however you leave that scope: See L for some details about mixing reading and writing. +=item opendir DIRHANDLE,MODE,EXPR + =item opendir DIRHANDLE,EXPR Opens a directory named EXPR for processing by C, C, C, C, and C. Returns true if successful. DIRHANDLEs have their own namespace separate from FILEHANDLEs. +In three-argument form the middle argument may be C<:utf8> to force +the filenames returned by readdir() to be in UTF-8 encoding of Unicode. +This naturally works only if your filesystem returns UTF-8 filenames. + =item ord EXPR =item ord @@ -3728,6 +3734,10 @@ C there, it would have been testing the wrong file. @dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR); closedir DIR; +In some filesystems it is possible to return UTF-8 encoded filenames. +To get readdir() to return such filenames, you must use C<:utf8> with +the three-argument form of opendir(), see L. + =item readline EXPR Reads from the filehandle whose typeglob is contained in EXPR. In scalar