in reply to Review this HTML-generating code

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.

Replies are listed 'Best First'.
Re: Re: Review this HTML-generating code
by ChemBoy (Priest) on Apr 20, 2001 at 19:21 UTC

    Or you can use qq{}, which allows interpolation but lets you use unescaped doublequotes. I'd go for using that all around instead of using single-quotes half the time.



    If God had meant us to fly, he would *never* have give us the railroads.
        --Michael Flanders