Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: CGI::Vars weirdness

by gam3 (Curate)
on Apr 04, 2008 at 02:20 UTC ( [id://678314]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://678314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-04-23 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found