Web form element names automatically become script variable names and are
assigned their values...
use CGI 'param';
for $name (param()) {
$$name = param($name);
}
The double $$ is not a typo. Your question resulting in this solution has
reduced the script I'm working on, by about 2000
You can use the import_names function of CGI
import_names( 'R' );
print name = , $R::name;
This function will import all of the parameters into the namespace provided
as the argument (in this case, R). If the parameter is multivalued, then
you can use the array form( e.g. @R::name ).
Hi, Mariusz, :)
I don't qualify as an expert, but this might do the trick:
my %params;
$params{$_} = param($_) foreach param();
If I understand your code correctly, param() returns a list of all the
possible keys, right? If so, then the above code should work. You refer to
the parameters as