diff options
author | Dominic Dunlop <domo@slipper.ip.lu> | 1996-12-28 10:56:41 +0100 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-01-01 08:59:00 +1200 |
commit | a034a98d8bfd0fd904012bd5227ce209aaaa0b26 (patch) | |
tree | e2afccfa1b455a13bf9d8e0ec521987c49b5c07c /pod/perlform.pod | |
parent | e38874e2f3f61264e6d7b5d69540cdd51724e623 (diff) | |
download | perl-a034a98d8bfd0fd904012bd5227ce209aaaa0b26.tar.gz |
Locale-related pod patches, take 2
[Ahem. Had the wrong thing in the scratch-pad, didn't I? Please ignore my
previous full posting of a slightly-tweaked perllocale.pod. This mail
contains what I really meant to send.]
Herewith (quick, before _18 appears) locale-related patches to the
documentation in perl5.003_17/pod. The main effect is to add
locale-related information to pods other than perllocale.pod, although
there are some tiny tweaks to that pod too. Produces no complaints from
pod2man; not checked for layout since 5.003_13.
p5p-msgid: <v03007800aeea9e488b36@[194.51.248.77]>
Diffstat (limited to 'pod/perlform.pod')
-rw-r--r-- | pod/perlform.pod | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pod/perlform.pod b/pod/perlform.pod index 4fac1a69e3..b11936b534 100644 --- a/pod/perlform.pod +++ b/pod/perlform.pod @@ -72,7 +72,14 @@ separated by commas. The expressions are all evaluated in a list context before the line is processed, so a single list expression could produce multiple list elements. The expressions may be spread out to more than one line if enclosed in braces. If so, the opening brace must be the first -token on the first line. +token on the first line. If an expression evaluates to a number with a +decimal part, and if the corresponding picture specifies that the decimal +part should appear in the output (that is, any picture except multiple "#" +characters B<without> an embedded "."), the character used for the decimal +point is B<always> determined by the current LC_NUMERIC locale. This +means that, if, for example, the run-time environment happens to specify a +German locale, "," will be used instead of the default ".". See +L<perllocale> and L<"WARNINGS"> for more information. Picture fields that begin with ^ rather than @ are treated specially. With a # field, the field is blanked out if the value is undefined. For @@ -306,10 +313,20 @@ is to printf(), do this: END print $string; -=head1 WARNING +=head1 WARNINGS Lexical variables (declared with "my") are not visible within a format unless the format is declared within the scope of the lexical variable. (They weren't visible at all before version 5.001.) Furthermore, lexical aliases will not be compiled correctly: see L<perlfunc/my> for other issues. + +Formats are the only part of Perl which unconditionally use information +from a program's locale; if a program's environment specifies an +LC_NUMERIC locale, it is always used to specify the decimal point +character in formatted output. Perl ignores all other aspects of locale +handling unless the C<use locale> pragma is in effect. Formatted output +cannot be controlled by C<use locale> because the pragma is tied to the +block structure of the program, and, for historical reasons, formats +exist outside that block structure. See L<perllocale> for further +discussion of locale handling. |