in reply to Escaping %params
And beware of params that have more than one value, e.g. checkbox groupsmy %params = map { $_ => $cgi->param($_) } $cgi->param;
Update: to allow for params with multiple values:
When further processing %params you will need to check if $param{$name} is an array reference.my %params; for my $name ($cgi->param) { my @values = $cgi->param($name); $params{$name} = @values > 1 ? \@values : $values[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escaping %params
by DaisyLou (Sexton) on Jan 21, 2014 at 01:37 UTC | |
by tangent (Parson) on Jan 21, 2014 at 01:48 UTC | |
by Anonymous Monk on Jan 21, 2014 at 02:46 UTC | |
by AnomalousMonk (Archbishop) on Jan 21, 2014 at 23:27 UTC | |
|
Re^2: Escaping %params
by DaisyLou (Sexton) on Jan 21, 2014 at 15:16 UTC | |
by Anonymous Monk on Jan 21, 2014 at 21:38 UTC |