=head1 DESCRIPTION
Perl supports language-specific notions of data such as "is this a
-letter", "what is the upper-case equivalent of this letter", and "which
+letter", "what is the uppercase equivalent of this letter", and "which
of these letters comes first". These are important issues, especially
for languages other than English - but also for English: it would be
very naE<iuml>ve to think that C<A-Za-z> defines all the "letters". Perl
If you want a Perl application to process and present your data
according to a particular locale, the application code should include
-the S<C<use locale>> pragma (see L<The use locale Pragma>) where
+the S<C<use locale>> pragma (see L<The use locale pragma>) where
appropriate, and B<at least one> of the following must be true:
=over 4
category's locale is returned to the default specified by the
corresponding environment variables. Generally, this results in a
return to the default which was in force when Perl started up: changes
-to the environment made by the application after start-up may or may not
+to the environment made by the application after startup may or may not
be noticed, depending on the implementation of your system's C library.
If the second argument does not correspond to a valid locale, the locale
comparison of the transformed strings. By calling strxfrm() explicitly,
and using a non locale-affected comparison, the example attempts to save
a couple of transformations. In fact, it doesn't save anything: Perl
-magic (see L<perlguts/Magic>) creates the transformed version of a
+magic (see L<perlguts/Magic Variables>) creates the transformed version of a
string the first time it's needed in a comparison, then keeps it around
in case it's needed again. An example rewritten the easy way with
C<cmp> runs just about as fast. It also copes with null characters
'E<oslash>' may be understood as C<\w> characters.
The C<LC_CTYPE> locale also provides the map used in translating
-characters between lower- and upper-case. This affects the case-mapping
+characters between lower and uppercase. This affects the case-mapping
functions - lc(), lcfirst, uc() and ucfirst(); case-mapping
interpolation with C<\l>, C<\L>, C<\u> or <\U> in double-quoted strings
and in C<s///> substitutions; and case-independent regular expression
Three examples illustrate locale-dependent tainting.
The first program, which ignores its locale, won't run: a value taken
-directly from the command-line may not be used to name an output file
+directly from the command line may not be used to name an output file
when taint checks are enabled.
#/usr/local/bin/perl -T
# Run with taint checking
- # Command-line sanity check omitted...
+ # Command line sanity check omitted...
$tainted_output_file = shift;
open(F, ">$tainted_output_file")
The program can be made to run by "laundering" the tainted value through
a regular expression: the second example - which still ignores locale
-information - runs, creating the file named on its command-line
+information - runs, creating the file named on its command line
if it can.
#/usr/local/bin/perl -T
=item PERL_BADLANG
A string that can suppress Perl's warning about failed locale settings
-at start-up. Failure can occur if the locale support in the operating
+at startup. Failure can occur if the locale support in the operating
system is lacking (broken) is some way - or if you mistyped the name of
a locale when you set up your environment. If this environment variable
is absent, or has a value which does not evaluate to integer zero - that
environment suggested otherwise. By default, Perl still behaves this
way so as to maintain 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 S<C<use locale>> Pragma>) to
+the S<C<use locale>> pragma (see L<The use locale Pragma>) to
instruct it to do so.
Versions of Perl from 5.002 to 5.003 did use the C<LC_CTYPE>