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:

$condition{$key} = \@{$query->param($key)} || $condition{$key} = $quer +y->param($key);
Why not use
$condition{$key} = [$query->param($key)];
Which will give you an array-ref with 1 element when the parameter only has one value.

If you really need to, you can later do:

if (@{$condition{$key}} == 1) { # one value } else { # ... zero or more than one value }