Perl Programming/Keywords/formline

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: foreach Keywords Next: ge

The formline keyword[edit | edit source]

formline is an internal function that is used by format, but can be used directly. It formats a LIST of values according to PICTURE, and placing the output to the $^A variable (or $ACCUMULATOR in English).

Perl attempts to flush all opened files for output before forking the child process, but this may not be supported on some platforms. To be safe, you may need to set $| ($AUTOFLUSH in English) or call the autoflush() method of IO::Handle on all open handles so that duplicate output is avoided. It is called by format once per form line.

Syntax[edit | edit source]

  formline PICTURE, LIST

See also[edit | edit source]

Previous: foreach Keywords Next: ge