Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OMIT TOP OF PAGE FORMAT FOR FIRST PAGE

Status
Not open for further replies.

newjim

Programmer
Sep 8, 2001
21
CA
Hello All

I have the top of page format working, but want to omit that format for the first page. Dang, no matter what I do, it keeps showing up. Any ideas?
 
Could we see your code to see how you are doing it? If you are also keeping count of page numbers you could check that your page number > 1 before doing the formatting.
 
I've tried a number ways, as you can imagine. Here's one that sets the top of page format to TOP, not BLANK for the first page:

#BLANK is a blank format. I want to use that as the top of
# page formatfor the START page
#START is the first page, should have BLANK top of page
# format
#TOP is the top of page format for each page except the
# START page
#BOTTOM is the final format

open(BOTTOM,">mytext.txt") || die "can't create mytext.txt";

$main=select BOTTOM;#change filehandle and save main::STDOUT as $main
$^="BLANK";#set top of the page format to BLANK
$= = 30;#set linefeed at 30 lines per page

$~ = "START";#set format to START
write (START);#invoke format
$- =0;#set linefeed count to zero
select $main;#reselect main::STDOUT as default filehandle
$main=select BOTTOM;# change filehandle to BOTTOM again
$^="TOP";#set top of the page format to BLANK
$= = 30;#set linefeed at 30 lines per page
select $main;#reselect main::STDOUT as default filehandle

.
.
.
$^="BOTTOM";#change the format to BOTTOM
write(BOTTOM);
close(BOTTOM);

I know I'm missing something here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top