foreach ($cgi->param()) { if (/^year_\d+$/) { push(@years, $cgi->param($_)); } }