Mailing List Archive

Trying to get list/hash of form values with Params
I can't get $Request->Params to give me the list of
parameters in a form I can loop through. Can someone
provide an example?

I've tried variations on

%params = $Request->Params();

foreach $key (keys %params)
{
// etc.
}

to no avail.

Thanks in advance for any suggestions.

Mark McWiggins
425-369-8286





---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: Trying to get list/hash of form values with Params [ In reply to ]
Quoting mark_mcwiggins <mark@icanfixyouremail.com>:

>
> I can't get $Request->Params to give me the list of
> parameters in a form I can loop through. Can someone
> provide an example?
>
> I've tried variations on
>
> %params = $Request->Params();
>
> foreach $key (keys %params)
> {
> // etc.
> }
>

First, you need to set RequestParams ...
http://www.apache-asp.org/config.html#RequestParam25a784ba

Then you can try:

my $params = $Request->Params;
for my $key (keys %$params) {
my $value = $params->{$key};
...
}

Regards,

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org