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!