http://www.perlmonks.org?node_id=1031330


in reply to CGI array with key value pairs?

As a general advice, you can always use Data::Dumper to see what data structures are really coming into your module.

It may also be a good idea to look at the CGI::Vars method...

Updated advice: It has been pointed out that CGI::Struct is the correct way to go instead of CGI::Vars, but you still have to go through CGI::Vars before passing the result to CGI::Struct

If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P

Replies are listed 'Best First'.
Re^2: CGI array with key value pairs?
by Anonymous Monk on Apr 30, 2013 at 07:41 UTC

    It may also be a good idea to look at the CGI::Vars method...

    No, it is never a good idea to look at the legacy CGI::Vars () function, it exists solely for antiquely antique backwards compatibility , and has way too many caveats ( Problem with CGI::Vars )

    CGI::Struct does the job the OP is looking for

      Thanks for the info - I've updated my answer,

      If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P