Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Parse messy string into neat data structure

by ikegami (Pope)
on Aug 09, 2010 at 01:33 UTC ( #853702=note: print w/replies, xml ) Need Help??


in reply to Parse messy string into neat data structure

Wrong sigil for @images[0].
split takes a regex. There's no reason to use a string literal.
Needless code duplication.

my @images = map { [ /\w+\.jpg/gi ] } split /\|/, $str;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-10-18 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (99 votes). Check out past polls.

    Notices?