R
runderwo
Using CGI.pm from perl 5.8.8.
If I have a form variable named foo[], I noticed that using
Data:umper to print the contents of CGI:aram for that variable:
warn Dumper $query->param('foo[]');
returns:
<!-- warning: $VAR1 = 'ARRAY(0x82996a8)'; -->
You would think, ok, it's just printing the reference to an empty
array. Odd since Dumper usually recognizes references and prints
their structure, but whatever.
The really odd thing is that if the form variable actually submitted
values, I get something like this:
<!-- warning: $VAR1 = '(e-mail address removed)';
$VAR2 = '(e-mail address removed)';
$VAR3 = 'ARRAY(0x8297a98)'; -->
What in the world is the ARRAY() member in that case? It's certainly
not containing the form values, since they are members of the list
alongside it.
Even stranger is that the member is actually a string. If I try to
dereference it with @{$query->param($key)}, I get an error about using
a string as an array ref. If I assign to a list:
my @foo = $query->param($key);
then I get a list of size 1 with the string 'ARRAY(0x8297a98)' as the
first member.
I have no idea what this means. First time I ever noticed it. Does
something seem wrong here?
If I have a form variable named foo[], I noticed that using
Data:umper to print the contents of CGI:aram for that variable:
warn Dumper $query->param('foo[]');
returns:
<!-- warning: $VAR1 = 'ARRAY(0x82996a8)'; -->
You would think, ok, it's just printing the reference to an empty
array. Odd since Dumper usually recognizes references and prints
their structure, but whatever.
The really odd thing is that if the form variable actually submitted
values, I get something like this:
<!-- warning: $VAR1 = '(e-mail address removed)';
$VAR2 = '(e-mail address removed)';
$VAR3 = 'ARRAY(0x8297a98)'; -->
What in the world is the ARRAY() member in that case? It's certainly
not containing the form values, since they are members of the list
alongside it.
Even stranger is that the member is actually a string. If I try to
dereference it with @{$query->param($key)}, I get an error about using
a string as an array ref. If I assign to a list:
my @foo = $query->param($key);
then I get a list of size 1 with the string 'ARRAY(0x8297a98)' as the
first member.
I have no idea what this means. First time I ever noticed it. Does
something seem wrong here?