in reply to "CGI::param called in list context" confusion
Somewhere in your code, something calls $cgi->param('foo'), but allows it to return more than one parameter. The line could look like:
my @foos= $cgi->param('foo');
or
print_results( foo => $cgi->param('foo'), is_admin => 0 );
The second form is the problematic form, because $cgi->param('foo') could return more than one item but nothing in your code expects that. The most likely fix is to change that line to:
print_results( foo => scalar($cgi->param('foo')), is_admin => 0 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "CGI::param called in list context" confusion
by Anonymous Monk on Mar 19, 2015 at 09:26 UTC | |
by Corion (Patriarch) on Mar 19, 2015 at 09:54 UTC | |
by LanX (Saint) on Mar 19, 2015 at 09:58 UTC |