in reply to map, grep, for, foreach
I couldn't be bothered to Benchmark it but I suspect this is going to be the most efficient or at least a very competitive variant, especially so if the number of parameters is substantial.my @param = $q->param(); @input{@param} = map $q->param($_), @param;
Update: Or maybe this:
Finally, this leads us to another variation which I like best:my @param = $q->param(); @input{@param}=(); $input{$_} = $q->param($_) for @param;
Between the latter two, I'm not sure which one will perform better.@input{$q->param()}=(); $input{$_} = $q->param($_) for keys %input;
Makeshifts last the longest.
In Section
Seekers of Perl Wisdom