summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-04-19 09:19:33 -0600
committerKarl Williamson <public@khwilliamson.com>2011-04-19 09:34:43 -0600
commit70709c6895a82d6efd7fc77e971a862c6c060421 (patch)
treeb8856f69153e213d4ada8ca228d290be34bcf324
parentc7b60aed128af1df55c8cc04d0088039dbaf9866 (diff)
downloadperl-70709c6895a82d6efd7fc77e971a862c6c060421.tar.gz
perllocale: Mention /l
Also the possibility of an undefined initial locale
-rw-r--r--pod/perllocale.pod9
1 files changed, 7 insertions, 2 deletions
diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index ceb713743c..8926d8bc81 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -90,7 +90,8 @@ L<The setlocale function>.
=head2 The use locale pragma
By default, Perl ignores the current locale. The S<C<use locale>>
-pragma tells Perl to use the current locale for some operations.
+pragma and the C</l> regular expression modifier tell Perl to use the
+current locale for some operations (C</l> for just pattern matching).
The current locale is set at execution time by
L<setlocale()|/The setlocale function> described below. If that function
@@ -99,6 +100,8 @@ current locale is that which was determined by the L<"ENVIRONMENT"> in
effect at the start of the program, except that
C<L<LC_NUMERIC|/Category LC_NUMERIC: Numeric Formatting>> is always
initialized to the C locale (mentioned under L<Finding locales>).
+If there is no valid environment, the current locale is undefined. It
+is likely, but not necessarily, the "C" locale.
The operations that are affected by locale are:
@@ -950,7 +953,9 @@ always in force, even if the program environment suggested otherwise
(see L<The setlocale function>). By default, Perl still behaves this
way for backward compatibility. If you want a Perl application to pay
attention to locale information, you B<must> use the S<C<use locale>>
-pragma (see L<The use locale pragma>) to instruct it to do so.
+pragma (see L<The use locale pragma>) or for just pattern matching, the
+C</l> regular expression modifier (see L<perlre/Character set
+modifiers>) to instruct it to do so.
Versions of Perl from 5.002 to 5.003 did use the C<LC_CTYPE>
information if available; that is, C<\w> did understand what