Sure, the second way you listed is correct, and the CGI would store each
value for that key into an array.

In that example, you would end up with a Hash of Arrays. In Perl, that
would look like this:

  %params = ( 'A' => [ 111, 222, 333 ] );

Reference material about CGIs is here:


https://metacpan.org/pod/distribution/CGI/lib/CGI.pod#Fetching-the-names-of-all-the-parameters-passed-to-your-script



On Sat, May 12, 2018 at 5:48 PM, William Park via talk <[email protected]>
wrote:

> Hi all,
>
> If I'm sending single valued data over web, eg. a=111, b=222, c=333,
> then I can do
>     http://.../xxx.cgi?a=111&b=222&c=333
>
> How do I send array data, like A[1]=111, A[2]=222, A[3]=333 to a CGI
> script?  I don't think I can do something like
>     http://.../xxx.cgi?A[1]=111&A[2]=222&A[3]=333
> Or, can I?
>
> I have seen a same variable repeated,
>     http://.../xxx.cgi?A=111&A=222&A=333
> but that means the CGI script has to build the array.
> --
> William Park <[email protected]>
> ---
> Talk Mailing List
> [email protected]
> https://gtalug.org/mailman/listinfo/talk
>



-- 
Alex Beamish

Software Developer / https://ca.linkedin.com/in/alex-beamish-5111ba3
Speaker Wrangler, Toronto Perlmongers / http://to.pm.org/
Baritone, Board Member, Toronto Northern Lights, 2013 Champions /
www.northernlightschorus.com
Certified Contest Administrator, Barbershop Harmony Society /
www.barbershop.org
---
Talk Mailing List
[email protected]
https://gtalug.org/mailman/listinfo/talk

Reply via email to