first as was told to me and I will pass it on, its always a good thing to get in the habit of useing strict.
#!/usr/bin/perl -w
use strict;
use CGI qw/:standard *table *Tr *td/; require "/home/httpd/cgi-bin/per
+l_scripts/syb_handlers.pl";
use Sybase::DBlib;
use CGI::Carp qw(fatalsToBrowser);
&dbmsghandle ("message_handler");
&dberrhandle ("error_handler");
open(OUTPUTFILE, ">/home/output.htm") or die $!;
# print OUTPUTFILE header;
print OUTPUTFILE "<html><head>\n";
print OUTPUTFILE "<title>My Title</title></head><body>\n";
print OUTPUTFILE (loads of lines of html resulting from the database
+queries)
print OUTPUTFILE "</body></html>\n";
close(OUTPUTFILE);
hopeing that I understood the question right, I myself would do it simular to this, or create variables with header and footer code in it, thus the same effect.
in the code you posted you did not close the document in which you opened this can lead to bad things (dark side of the force).
hope this helps, any more questions I will do what I can to help.
Ben
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.