our %hash; my @all_params = $webapp->param(); for my $p (@all_params) { $hash{$p} = $webapp->param($p); # } ... use %hash instead of calling $webapp->param(...) ...