I didn't know that, but I'm skeptical -- which confuses me, considering the source. The actual "top of report" from yesterday (formatted to fit the text window - along with the beginning of the main body of the report):

Page: 1 End of day register report Mon Jul 8 18:10:38 2002 Run by: Ovid Terminal: some.terminal Total Sales --------------- 12.34

I just typed that in directly from a test report sitting by my right hand.

From perldoc -f write (emphasis mine):

Top of form processing is handled automatically: if there is insufficient room on the current page for the formatted record, the page is advanced by writing a form feed, a special top-of-page format is used to format the new page header, and then the record is written. By default the top-of-page format is the name of the filehandle with "_TOP" appended, but it may be dynamically set to the format of your choice by assigning the name to the "$^" variable while the filehandle is selected. The number of lines remaining on the current page is in variable "$-", which can be set to "0" to force a new page.

And from page 123 of the 2nd Camel (emphasis mine):

Top-of-form processing is by default handled by a format with the same name as the current filehandle with "_TOP" concatenated to it. It's triggered at the to of each page.

So, perldoc mentions something about a "special top-of-page format" used to format new page headers, but this seems very unclear. What "special" format. How does this differ from the current "top-of-page" format? This program used to do what I want and now it doesn't. I've also heard that our client has had intermittant problems with this. Seems like a bug, but whether it's in my code or Perl, I don't know. I suspect a bug in the documentation, actually :) I'd be happy to submit a doc patch to P5P, if I knew what I was patching (if, in fact, unclear docs are the problem).

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to Re: •Re: Top of format won't print by Ovid
in thread Top of format won't print by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.