in reply to Getting back values of an array of names reurned by CGI when the names are variables

This smells like bad design.
However, provided it is CGI, you can easily do:

# 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 valu +e }

Update: Code rewritten as foreach loop

Cheerio, Sören

  • Comment on Re: Getting back values of an array of names reurned by CGI when the names are variables
  • Download Code