Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
No such thing as a small change
 
PerlMonks  

Re^2: Building data structures from CGI params

by fullermd (Curate)
on Nov 21, 2010 at 09:53 UTC ( #872772=note: print w/ replies, xml ) Need Help??


in reply to Re: Building data structures from CGI params
in thread Building data structures from CGI params

No, for the example HTML I had:

<input type="text" name="foo{bar}" value="barval"> <input type="text" name="foo{baz}" value="bazval">

that would yield me

$params = { "foo{bar}" => "barval", "foo{baz}" => "bazval" }

I want

$params = { foo => { bar => "barval", baz => "bazval", } }
EDIT

Pshaw, you update'd while I was typing :)

Yes, it's not (in the simple case) that hard to code up. Handling params like foo{bar}[6]{baz}[2] gets a little more involved though. It's just complex enough that I'm confident I'll either make a mistake somewhere, or wind up with code with somewhat unpleasant performance characteristics in extremis. So I'd hoped (and it seems such an obvious thing to want that I'd expected) there was an existing module I could mooch off^W^Wutilize...


Comment on Re^2: Building data structures from CGI params
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2014-04-17 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls