http://qs1969.pair.com?node_id=678314


in reply to CGI::Vars weirdness

I am confused by you problem.

If you would like to have the QUERY_STRING directly you can parse $ENV{QUERY_STRING};

my @values = split(/&/,$ENV{QUERY_STRING}); foreach my $i (@values) { my ($name, $value) = split(/=/, $i); push(@{$keys{$name}}, $value); }
Note that this has a slightly different structure that the structure ruturned by CGI::Vars.
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: CGI::Vars weirdness
by chromatic (Archbishop) on Apr 04, 2008 at 05:38 UTC

    The semicolon is also a valid separator for key-value pairs in URL-encoded query strings... but don't parse query strings by hand. You'll get it wrong.

      Not quite. ";" is a valid separator for HTTP URLs, but not for application/x-www-form-urlencoded (i.e. form) data.

      In other words, you may assign URLs any meaning you wish to ";" in URLs to resources you control, but it's by no means equivalent to "&" unless you choose it to be for those resources. You shouldn't impose your choice as fact onto others.