in reply to How do I get a reference to a subroutine return value?

I'm not sure I understand the question either, but if you would like those params in your sub, why don't you pass the query object to the sub?
myfunc($query); sub myfunc { my $query = shift; }
If you need the param values in an array ref to pass to the sub then you can use this
my @values = map { $q->param($_) } $q->param; myfunc(\@values);