in reply to Unstickying CGI

I got around the problem by print html strings like this:
print "<input name=$name value=$value>\n";
This won't be sticky.

Replies are listed 'Best First'.
Re: Unstickying CGI
by Ionizor (Pilgrim) on Aug 02, 2002 at 19:37 UTC

    This is slightly offtopic and very nitpicky and may very well get me voted down but HTML should have quoted attribute values:

    print "<input name=\"$name\" value=\"$value\">\n";

    The same code written in XHTML 1.0:

    print "<input name=\"$name\" value=\"$value\" />\n";

      Also, I find that if you have to escape more then one quote, you're probably better off invoking qq{} with different delimiters, like <code>print qq{<input name="$name" value="$value" />

      (I almost always write XHTML; no good reason not too.) Also, you should be more careful if $name or $value potentialy contain quotes.


      Confession: It does an Immortal Body good.