http://www.perlmonks.org?node_id=179539


in reply to Input arrays to CGI

CGI.pm 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:
./foo.pl 'list=foo&list=bar&list=baz&list=qux'
and you should see the following:
$VAR1 = [ 'foo', 'bar', 'baz', 'qux' ];