in reply to How to retrieve certain Form Input

#!/usr/bin/perl use strict; use warnings; use CGI; my $cgi = CGI->new(); # Get a list of all parameters my @params = $cgi->param(); # Get a list of parameters that are named 'text' followed by a number my @text_fields = grep /^text\d+$/, @params; #Output the http header print "Content-type: text/html\n\n"; for my $param (@text_fields) { printf "%10s = %s<br>\n", $param, $cgi->param($param); }