FORMAT in PERL

I have just used FORMAT in my PERL script. In FORMAT, I have a header and body.
It occur to me that there is a page break at about every 54 lines.

How do I setup the FORMAT, so there is only one header or a page break at every 20 lines ?
j_scriptAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
monasConnect With a Mentor Commented:
you should change header to blank one after first "write";

something like this:

format FIRST_HEADER =
--------------------------------

Some | Field | Descrioptions    |

--------------------------------

.

format EMPTY_HEADER=
.


$^ = FIRST_HEADER;
# form values here
write;
$^ = EMPTY_HEADER;
while(){ .... write(); ....}
0
 
ozoCommented:
$= = 20;
0
 
j_scriptAuthor Commented:
ozo,

What about the header ? If I want to show the header only one !
0
 
ozoCommented:
Do you want to just set a blank header and do a printf only once?
0
 
j_scriptAuthor Commented:
only print the header once
0
All Courses

From novice to tech pro — start learning today.