I agree with
jepri's comments about not re-inventing the
wheel, but when you're forced to, you might as well use
a few tricks to make your life easier.
In particular, when writing HTML, you can use single-quotes
instead of double-quotes. Such as:
print "<A HREF='http://www.perlmonks.org'>Perl Monks</A>\n";
This will save you the agony of having to escape every
double quote instance, which can add up to a lot of pain
for large files.