Thank you kutsu for that very simple and elegant solution (I'm learning to untaint user input this very moment and this is helpful).

However, at the risk of being OT, menolly and other monks, I really do wonder what the percentage is of people who are surfing sans-javascript (JS). With the plethora of helpful pop-up windows, DHTML menus and other tricks, how is this possible? What about Flash? I have a personal aversion to sites that are only Flash and usually skip them. How much am I missing?

Secondly, do we webbies code for non-JS surfers? Or is this akin to coding web-safe colors, 640x480 monitors, and Netscape 4.7?

Lastly, even though we need to validate on the server-side, JS on the client side can validate input and return an error so much faster than the Perl which has to refresh the screen each time.

It is the dilema I'm facing now as I learn to code Perl accurately and securely, and not miss out on all the fun of JS and DHTML brings the pure designer (who is avoiding Flash). Let the debate rage!


In reply to Re: Re: Re: Re: A problem use CGI.pm by bradcathey
in thread A problem use CGI.pm by lgjut

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.