Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: CGI::Vars weirdness

by gam3 (Curate)
on Apr 04, 2008 at 02:20 UTC ( #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.


Comment on Re: CGI::Vars weirdness
Download Code
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
Node Status?
node history
Node Type: note [id://678314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-09-18 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (103 votes), past polls