for (1..10){ # using one var and letting CGI handle it print qq{ }; } # In your script that receives the POST use CGI; my $cgi = new CGI; my @stuff = $cgi->param('stuff'); foreach my $thing (@stuff){ "INSERT INTO STUFF_HOLDER VALUES('$thing')"; }