in reply to Re: Meditations On HTML In Perl
in thread Meditations On HTML In Perl

I would agree that escaping double quotes in HTML sucks. Instead I usually use qq with parentheses or braces.

e.g. print qq(<p>A link to the <a href="test.html">test page</a></p>);

Replies are listed 'Best First'.
Re: Meditations On HTML In Perl
by Ionizor (Pilgrim) on Dec 05, 2002 at 01:42 UTC
    With the caveat, of course, that JavaScript will break horribly unless you escape your brackets. That brings us back to the original problem or forces us to use a different delimiter.

      But you can put your JavaScript in a separate file and just refer to it. Of course, that hasn't worked for me when I needed it to, so I had to use a HereDoc to get it to work. Ugh.

      --t. alex
      but my friends call me T.

        I know <link>ed JavaScripts work in IE 5 and in Mozilla and its derivatives. I've never had a problem with it, myself. Then again I don't just JavaScript all that much. I have an aversion to putting things in the client - an axiom of thin clients is that you never put anything in the client because it's in the hands of the enemy (especially thin clients for games).