|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
17.6 Using Fill Mode
On text fields the caret enables a kind of fill mode. Instead of an
arbitrary expression, the value supplied must be a scalar variable
that contains a text string. Perl puts the next portion of the text into
the field, and then chops off the front of the string so that the next time
the variable is referenced, more of the text can be printed. (Yes, this
means that the variable itself is altered during execution of the write()
call, and is not restored.) The next portion of text is determined by
a crude line breaking algorithm. You may use the carriage return character
\r) to force a line break. You can change which characters are legal
to break on by changing the variable
$FORMAT_LINE_BREAK_CHARACTERS if you're using the English module) to a
list of the desired characters.
Normally you would use a sequence of fields in a vertical stack associated
with the same scalar variable to print out a block of text. You might wish
to end the final field with the text "
...", which will appear in the output
if the text was too long to appear in its entirety.
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|