# If I got you right and the variable in question was multivalue # (as you represented it with a Perl array): my ( $username, $path, @names ) = $cgi->param("names"); # to geht what you need for the following: my @value; # will contain the values. foreach my $i ( 0 .. $#names ) { my $combined_name = $username . "-" . $names[$i]; # build the key $value[$i] = $cgi->param("$combined_name"); # fetch the value }