Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Parsing attributes in one line using map

by jdporter (Canon)
on Sep 25, 2006 at 14:53 UTC ( #574743=note: print w/replies, xml ) Need Help??


in reply to Parsing attributes in one line using map

split /=/
should be
split /=/, $_, 2

But what if any of the values contains ',' or '='?

my %attrs = $attr =~ /([^=,]+)=(.*?)(?:(?=,[^=,]+=)|$)/g;
We're building the house of the future together.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2021-01-27 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?