G
garhone
I'm trying to view the contents of my CGI object, directly and using
param.
I encounter a problem with scrolling lists.
Here's my scrolling list: 'slist' => ['foo', 'bar', 'fu', 'foobar',
'fubar'];
When I use Data:umper on $q, the CGI object, I'll see
....
,'slist' => ['foo', 'bar', 'fu', 'foobar', 'fubar'],
....
If I try to access 'slist' directly, I can see all of it:
print Dumper $q->{'slist'};
I get
$VAR1 = 'foo'
$VAR2 = 'bar'
$VAR3 = 'fu'
$VAR4 = 'foobar'
$VAR5 = 'fubar'
But if I try
my @a = $q->param('slist');
print Dumper @a;
I get
$VAR1 = 'foo'
and that's it.
Can anyone tell me why this is the case? How can I get
$q->param('slist') to return all the contents of 'slist' instead of
just the first element?
Thanks in advance
param.
I encounter a problem with scrolling lists.
Here's my scrolling list: 'slist' => ['foo', 'bar', 'fu', 'foobar',
'fubar'];
When I use Data:umper on $q, the CGI object, I'll see
....
,'slist' => ['foo', 'bar', 'fu', 'foobar', 'fubar'],
....
If I try to access 'slist' directly, I can see all of it:
print Dumper $q->{'slist'};
I get
$VAR1 = 'foo'
$VAR2 = 'bar'
$VAR3 = 'fu'
$VAR4 = 'foobar'
$VAR5 = 'fubar'
But if I try
my @a = $q->param('slist');
print Dumper @a;
I get
$VAR1 = 'foo'
and that's it.
Can anyone tell me why this is the case? How can I get
$q->param('slist') to return all the contents of 'slist' instead of
just the first element?
Thanks in advance