I must say that's rather an embarassing mistake but very nice catch, ++ to you. Thanks! | [reply] |
| [reply] |
I stopped using here-docs long ago. qq[ ... ] and similar span lines easily and have other advantages (and some fairly minor disadvantages) but have the significant advantage of not failing in the face of trailing whitespace. Trailing whitespace should never matter, and so here-docs are unacceptably fragile to me. The problems with leading spaces and simple misspelling of the terminator so easily resulting in quite confusing error messages are also good reasons to avoid them. :)
| [reply] [d/l] |
Happy to help.
Part of the problem you had in diagnosing the problem was because the source code was hard to parse at a glance, which tends to happen when HTML and perl are in the same context.
I recommend splitting the HTML into a template and using one of the many templating systems that are available. Everyone has their favorite (my favorite is Template Toolkit), but for a first effort I would recommend HTML::Template. You can learn the syntax and be up and running within 30 minutes generally.
| [reply] |