Formats list according to picture and accumulates the result into
Writes a formatted record to the specified file, using the format associated with that file. If filehandle is omitted, the currently selected one is taken.
Formats are defined as follows:
format [ name ]
formlist is a sequence of lines, each of which is either a comment line (
# in the first column), a picture line, or an argument line. A picture line contains descriptions of fields. It can also contain other text that will be output as given. Argument lines contain lists of values that are output in the format and order of the preceding picture line.
name defaults to
STDOUT if omitted.
To associate a format with the current output stream, assign its name to the special variable
$~. A format to handle page breaks can be assigned to
$^. To force a page break on the next write, set
$- to zero.
Picture fields are:
Left-adjusted field. Repeat the
Numeric format with implied decimal point.
Same, padded with leading zeros if necessary.
^ instead of
@ for multiline block filling.
~ in a picture line to suppress unwanted empty lines.
~~ in a picture line to have this format line repeated until it would yield a completely blank line. Use with
^ fields to have them repeated until exhausted.
$= in the section Special ...