Of course, some might argue about inconsistent mixing of array refs and regular scalars, but I still think it's cleaner.
I'll bite. If you (obviously not Ovid, who knows better) don't know whether your form field can generate multiple values, you don't understand the problem space. There be dragons.
Besides that, what if someone malicious or curious decides to edit the HTML locally or to submit extra information? If you don't check *every* variable to see if it's an array reference, the best you can hope for is a harmless crash. Try that with CGI, which for all its warts, handles this nicely.
Yeah, the map solution with array references is a sight better than the old cgi-lib.pl approach, but it's merely false laziness. You have to know what data to expect.
In reply to Re: (Ovid) Re(3): Creating vars from URI and printing %ENV
by chromatic
in thread Creating vars from URI and printing %ENV
by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |