Example:
Given this input:
a=7&b=1&text=Some+text+goes+here&required=Yes&submit=submit
Produce this data structure:
my $data = [ 'a' => 7, 'b' => 1, 'text' => 'Some text goes here', 'required' => 'Yes', 'submit' => 'submit', ];
The intended use is in a script that tests subroutines that are used inside of a mod_perl application. The subroutine under test expects pre-parsed post data in an array structure like that above. I'm using HTML::Form to extract and parse form data from an HTML page, then using it's $form->click method to click on various submit buttons on that page. $form->click returns an HTTP::Request object, from which I can extract the post data as a string (urlescaped and joined by ampersands), but I need to get that data properly parsed and unescaped to send it as input to the subroutine that I'm testing.
In reply to Parsing form post (content) by mp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |