If you were worried about this you could collect the parameters like this :-
my $hash = {};
for ($cgi->param())
{
push @{$hash->{$_}}, $cgi->param($_);
}
However I find that 9 times out of 10 you want the simpler hash, so you can collect the data twice in a slightly more
complicated way something like this :-
my $hash = {};
for ($cgi->param())
{
push @{$hash->{list}->{$_}}, $cgi->param($_);
$hash->{scalar}->{$_} = $hash->{list}->{$_}->[0];
}
You can then access most data with a simple $hash->{scalar}->{'whatever'} but for those cases when you cared about multiple entries you can do $hash->{list}->{'whatevers'}->
1
I think the CGI module is fantastic, but I do find it much more convenient to have my data in a hash rather than have to call it from param() when I need it. For a CGI of any length then I'd certainly use one of another of the methods above.