Perldoc Search: "$^A" perl-5.20.1

search official POD


3 PODs, 6 LINEs found.
perlform.pod
241 :     For low-level access to the formatting mechanism, you may use formline() and access $^A (the $ACCUMULATOR variable) directly.
249 :         print "Wow, I just stored '$^A' in the accumulator!\n";
257 :             $^A = "";
259 :             return $^A;
perlfunc.pod
1173 :         This is an internal function used by "format"s, though you may call it, too. It formats (see perlform) a list of values according to the contents of PICTURE, placing the output into the format output accumulator, $^A (or $ACCUMULATOR in English). Eventually, when a "write" is done, the contents of $^A are written to some filehandle. You could also read $^A and then set $^A back to "". Note that a format typically does one "formline" per line of form, but the "formline" function itself doesn't care how many newlines are embedded in the PICTURE. This means that the "~" and "~~" tokens treat the entire PICTURE as a single line. You may therefore need to use multiple formlines to implement a single record format, just like the "format" compiler.
perlvar.pod
773 :     $^A     The current value of the "write()" accumulator for "format()" lines. A format contains "formline()" calls that put their result into $^A. After calling its format, "write()" prints out the contents of $^A and empties. So you never really see the contents of $^A unless you call "formline()" yourself and then look at it. See perlform and "formline PICTURE,LIST" in perlfunc.
<< Back to Perldoc Search