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

Re: Spliting on Key/value pairs

by przemo (Scribe)
on May 11, 2009 at 10:34 UTC ( [id://763216]=note: print w/replies, xml ) Need Help??


in reply to Spliting on Key/value pairs

Looks like part of URL. You can parse it using split or regex, or use CGI::Simple:

use warnings; use strict; use CGI::Simple; my $query = '&keyname=value&keyname2=value2&keyname2=value3'; my $c = CGI::Simple->new($query); for my $p ($c->param) { printf "%s: %s\n", $p, join(',', $c->param($p)); } __END__ keyname: value keyname2: value2,value3

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found