Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Answer: Input arrays to CGI

by jeffa (Bishop)
on Jul 04, 2002 at 21:59 UTC ( #179539=categorized answer: print w/replies, xml ) Need Help??

Q&A > CGI programming > Input arrays to CGI - Answer contributed by jeffa will handle this. All you need to do is request the multi-value parameter as a list:
use strict; use CGI qw(param); use Data::Dumper; my @list = param('list'); print Dumper \@list;
Run this on the command line like so:
./ 'list=foo&list=bar&list=baz&list=qux'
and you should see the following:
$VAR1 = [ 'foo', 'bar', 'baz', 'qux' ];

Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2016-10-25 16:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (323 votes). Check out past polls.