Message-Id: <20011113172759.E27768@zippy.zyx.net>
[p5sagit/p5-mst-13.2.git] / pod / perlfunc.pod
index 340e15c..174ff60 100644 (file)
@@ -69,7 +69,7 @@ last value in the list.  Some operators return a count of successful
 operations.  In general, they do what you want, unless you want
 consistency.
 
-An named array in scalar context is quite different from what would at
+A named array in scalar context is quite different from what would at
 first glance appear to be a list in scalar context.  You can't get a list
 like C<(1,2,3)> into being in scalar context, because the compiler knows
 the context at compile time.  It would generate the scalar comma operator
@@ -291,7 +291,7 @@ X<-S>X<-b>X<-c>X<-t>X<-u>X<-g>X<-k>X<-T>X<-B>X<-M>X<-A>X<-C>
     -g File has setgid bit set.
     -k File has sticky bit set.
 
-    -T File is an ASCII text file.
+    -T File is an ASCII text file (heuristic guess).
     -B File is a "binary" file (opposite of -T).
 
     -M Age of file in days when script started.
@@ -563,9 +563,9 @@ previous time C<caller> was called.
 Changes the working directory to EXPR, if possible. If EXPR is omitted,
 changes to the directory specified by C<$ENV{HOME}>, if set; if not,
 changes to the directory specified by C<$ENV{LOGDIR}>. (Under VMS, the
-variable C<$ENV{SYS$LOGIN}> is used instead.) If neither is set,
-C<chdir> does nothing. It returns true upon success, false otherwise.
-See the example under C<die>.
+variable C<$ENV{SYS$LOGIN}> is also checked, and used if it is set.) If
+neither is set, C<chdir> does nothing. It returns true upon success,
+false otherwise. See the example under C<die>.
 
 =item chmod LIST
 
@@ -682,12 +682,12 @@ On POSIX systems, you can detect this condition this way:
 
 Returns the character represented by that NUMBER in the character set.
 For example, C<chr(65)> is C<"A"> in either ASCII or Unicode, and
-chr(0x263a) is a Unicode smiley face.  Note that characters from
-127 to 255 (inclusive) are not encoded in Unicode for backward
-compatibility reasons.
+chr(0x263a) is a Unicode smiley face.  Note that characters from 127
+to 255 (inclusive) are by default not encoded in Unicode for backward
+compatibility reasons (but see L<encoding>).
 
 For the reverse, use L</ord>.
-See L<utf8> for more about Unicode.
+See L<perlunicode> and L<encoding> for more about Unicode.
 
 If NUMBER is omitted, uses C<$_>.
 
@@ -857,7 +857,7 @@ back.  Look at the F<by-module/Crypt> and F<by-module/PGP> directories
 on your favorite CPAN mirror for a slew of potentially useful
 modules.
 
-If using crypt() on an Unicode string (which potentially has
+If using crypt() on a Unicode string (which potentially has
 characters with codepoints above 255), Perl tries to make sense of
 the situation by using only the low eight bits of the characters when
 calling crypt().
@@ -2004,7 +2004,7 @@ C<File::Glob> extension.  See L<File::Glob> for details.
 
 =item gmtime EXPR
 
-Converts a time as returned by the time function to a 8-element list
+Converts a time as returned by the time function to an 8-element list
 with the time localized for the standard Greenwich time zone.
 Typically used as follows:
 
@@ -2327,10 +2327,10 @@ C<redo> work.
 
 =item lc
 
-Returns an lowercased version of EXPR.  This is the internal function
+Returns a lowercased version of EXPR.  This is the internal function
 implementing the C<\L> escape in double-quoted strings.  Respects
 current LC_CTYPE locale if C<use locale> in force.  See L<perllocale>
-and L<perlunicode>.
+and L<perlunicode> for more details about locale and Unicode support.
 
 If EXPR is omitted, uses C<$_>.
 
@@ -2341,7 +2341,8 @@ If EXPR is omitted, uses C<$_>.
 Returns the value of EXPR with the first character lowercased.  This
 is the internal function implementing the C<\l> escape in
 double-quoted strings.  Respects current LC_CTYPE locale if C<use
-locale> in force.  See L<perllocale> and L<perlunicode>.
+locale> in force.  See L<perllocale> and L<perlunicode> for more
+details about locale and Unicode support.
 
 If EXPR is omitted, uses C<$_>.
 
@@ -2969,9 +2970,12 @@ DIRHANDLEs have their own namespace separate from FILEHANDLEs.
 
 =item ord
 
-Returns the numeric (ASCII or Unicode) value of the first character of EXPR.  If
-EXPR is omitted, uses C<$_>.  For the reverse, see L</chr>.
-See L<utf8> for more about Unicode.
+Returns the numeric (the native 8-bit encoding, like ASCII or EBCDIC,
+or Unicode) value of the first character of EXPR.  If EXPR is omitted,
+uses C<$_>.
+
+For the reverse, see L</chr>.
+See L<perlunicode> and L<encoding> for more about Unicode.
 
 =item our EXPR
 
@@ -3050,8 +3054,8 @@ sequence of characters that give the order and type of values, as
 follows:
 
     a  A string with arbitrary binary data, will be null padded.
-    A  An ASCII string, will be space padded.
-    Z  A null terminated (asciz) string, will be null padded.
+    A  A text (ASCII) string, will be space padded.
+    Z  A null terminated (ASCIZ) string, will be null padded.
 
     b  A bit string (ascending bit order inside each byte, like vec()).
     B  A bit string (descending bit order inside each byte).
@@ -3882,6 +3886,9 @@ C<main>.)  Here is a typical code layout:
     # In the main program
     push @INC, new Foo(...);
 
+Note that these hooks are also permitted to set the %INC entry
+corresponding to the files they have loaded. See L<perlvar/%INC>.
+
 For a yet-more-powerful import facility, see L</use> and L<perlmod>.
 
 =item reset EXPR
@@ -3918,7 +3925,7 @@ may vary from one execution to the next (see C<wantarray>).  If no EXPR
 is given, returns an empty list in list context, the undefined value in
 scalar context, and (of course) nothing at all in a void context.
 
-(Note that in the absence of a explicit C<return>, a subroutine, eval,
+(Note that in the absence of an explicit C<return>, a subroutine, eval,
 or do FILE will automatically return the value of the last expression
 evaluated.)
 
@@ -4108,7 +4115,7 @@ calling select() in scalar context just returns $nfound.
 
 Any of the bit masks can also be undef.  The timeout, if specified, is
 in seconds, which may be fractional.  Note: not all implementations are
-capable of returning the$timeleft.  If not, they always return
+capable of returning the $timeleft.  If not, they always return
 $timeleft equal to the supplied $timeout.
 
 You can effect a sleep of 250 milliseconds this way:
@@ -5461,8 +5468,9 @@ otherwise.
 Returns an uppercased version of EXPR.  This is the internal function
 implementing the C<\U> escape in double-quoted strings.  Respects
 current LC_CTYPE locale if C<use locale> in force.  See L<perllocale>
-and L<perlunicode>.  It does not attempt to do titlecase mapping on
-initial letters.  See C<ucfirst> for that.
+and L<perlunicode> for more details about locale and Unicode support.
+It does not attempt to do titlecase mapping on initial letters.  See
+C<ucfirst> for that.
 
 If EXPR is omitted, uses C<$_>.
 
@@ -5473,7 +5481,8 @@ If EXPR is omitted, uses C<$_>.
 Returns the value of EXPR with the first character in uppercase
 (titlecase in Unicode).  This is the internal function implementing
 the C<\u> escape in double-quoted strings.  Respects current LC_CTYPE
-locale if C<use locale> in force.  See L<perllocale> and L<perlunicode>.
+locale if C<use locale> in force.  See L<perllocale> and L<perlunicode>
+for more details about locale and Unicode support.
 
 If EXPR is omitted, uses C<$_>.