in reply to Re: CGI.pm - multiple values for same field name
in thread CGI.pm - multiple values for same field name

Anyhow, the only reason I wanted to access the list this way was because theres about 10 fields with the same field names and all fields are optional.
But, why are you interested only in a specific value of the fields? If one has some fields with the same name, usually those field are: (Another case where $INPUT->param('fieldname') will return multiple values if the field type is select and multiple is true).

So, if you know that you will get more than one values, why you're only interested in the particular value (from your example, the sixth element of the array)? If it wasn't a multiple <select> or <input type="checkbox"> field, say, a number of textfields with the same name, than there might be something wrong with your form design.


Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!