package import_params; use CGI ':standard'; use strict; my @all_params = param (); my $caller_package = caller; foreach my $prm (@all_params) { no strict 'refs'; my (@tmp); @tmp = param ($prm); if (scalar @tmp == 1) { ${"${caller_package}::${prm}"} = $tmp[0]; } elsif (scalar @tmp > 1) { @{"${caller_package}::${prm}"} = @tmp; } # You might want to remove the "elsif" part and # run the code everytime. Then you have _all_ # parameters in that array. } 1;