
Top-of-page format: STDOUT_TOP??
:
: In the man page for Perl 4.010, I find:
:
: > record is written. By default the top-of-page for-
: > mat is "top", but it may be set to the format of
: > your choice by assigning the name to the $^ vari-
: > able. The number of lines remaining on the current
:
: and
:
: > $^ The name of the current top-of-page format for the
: > currently selected output channel. Default is name
: > of the filehandle with "_TOP" appended. (Mnemonic:
: > points to top of page.)
:
: Now, this is what I have managed to get out of this:
:
: - If you write to filehandle F, and the format 'F_TOP' is defined,
: then that is used. Otherwise, the format 'top' is used, if it
: exists.
:
: - If you write to filehandle STDOUT, the format 'top' is used.
: If the format 'STDOUT_TOP' exists, it is ignored.
:
: Why handle STDOUT differently from other filehandles?
It isn't different, which you can verify empirically:
format top =
top
.
format STDOUT_TOP =
TOP
.
format STDOUT =
OUT
.
write;
write;
The first chunk of man page was unclear. The $^ chunk was correct.
The "top" format is still grandfathered in, if FILEHANDLE_TOP isn't
defined, but consider "top" deprecated.
Never trust documentation.
Larry