[Thamesvalley-pm] generating HTML
Greg Matthews
gmatt at nerc.ac.uk
Thu Oct 18 08:48:20 PDT 2007
Well... I threatened this email so here goes...
Is there a neater way of generating html than this:
print INDEX " <tr>
<td style=\"vertical-align: top;\">$host<br>
</td>\n";
??
At the moment my code loops round generating table rows (of which the
above is the first column).
Given that the table is of an arbitrary size (depending on the number of
hosts defined) am I approaching this the right way? ie directly printing
out the raw html?
The generated page is essentially static, it is just generated by a cron
job and the table contains links to pages of generated data for each
host (if available).
I'm used to making my perl look neat and readable but now that it
contains huge dollops of html (such as the definition of my $header and
my $footer) it looks a mess.
Let me know if anyone wants to see the whole thing (and have a good
laugh)...
GREG
--
Greg Matthews 01491 692445
Head of UNIX/Linux, iTSS Wallingford
--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.
More information about the Thamesvalley-pm
mailing list