Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2018-07-19 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (420 votes). Check out past polls.

    Notices?