in reply to CGI.pm: $q->param can be an array. Can be a single value. How do you know which?
Update to an update: Actually what I really wanted to do was:Why not use
$condition{$key} = \@{$query->param($key)} || $condition{$key} = $quer +y->param($key);
Which will give you an array-ref with 1 element when the parameter only has one value.$condition{$key} = [$query->param($key)];
If you really need to, you can later do:
if (@{$condition{$key}} == 1) { # one value } else { # ... zero or more than one value }
|
|---|