specified, it is truncated.
As an alternate form of right justification, you may also use "#"
-characters (with an optional ".") to specify a numeric field. This way
-you can line up the decimal points. If any value supplied for these
-fields contains a newline, only the text up to the newline is printed.
-Finally, the special field "@*" can be used for printing multi-line,
-nontruncated values; it should appear by itself on a line.
+characters (with an optional ".") to specify a numeric field. This way
+you can line up the decimal points. With a "0" (zero) instead of the
+first "#", the formatted number will be padded with leading zeroes if
+necessary. If any value supplied for these fields contains a newline,
+only the text up to the newline is printed. Finally, the special field
+"@*" can be used for printing multi-line, nontruncated values; it
+should appear by itself on a line.
The values are specified on the following line in the same order as
the picture fields. The expressions providing the values should be
If you use the English module, you can even read the variable names:
- use English;
+ use English '-no_match_vars';
$ofh = select(OUTF);
$FORMAT_NAME = "My_Other_Format";
$FORMAT_TOP_NAME = "My_Top_Format";
block structure of the program, and, for historical reasons, formats
exist outside that block structure. See L<perllocale> for further
discussion of locale handling.
+
+Inside of an expression, the whitespace characters \n, \t and \f are
+considered to be equivalent to a single space. Thus, you could think
+of this filter being applied to each value in the format:
+
+ $value =~ tr/\n\t\f/ /;
+
+The remaining whitespace character, \r, forces the printing of a new
+line if allowed by the picture line.