in reply to RE: Re: Passing arrays to a CGI
in thread Passing arrays to a CGI

@values = (param('foo'));
The 'extra' parens around the param() call force list context.
They do nothing of the sort! They are completely unnecessary. This will do just fine:
@values = param 'foo';

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: RE: RE: Re: Passing arrays to a CGI
by mkahn (Beadle) on Aug 03, 2003 at 03:55 UTC
    According to the documentation, maybe, and probably lots of your experience, it will work just fine.
    This didn't work for me. All the array values I passed were dumped into the first array element when I tried
    @list = param 'foo'; I was forced to add
    @list_f = split /\s+/, $list[0];
    I'm sure this had something to do with slices.
    I sent the data to this script using
    script.pl?list=@list