Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Extract data from CSV field.

by MidLifeXis (Monsignor)
on Dec 09, 2015 at 18:15 UTC ( [id://1149805]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Extract data from CSV field.
in thread Extract data from CSV field.

To further expand on poj's response, this is a case of calling context. You called the match (and capture) in scalar context, so the pattern match returned the number of matches (which would be at most 1, since you didn't use the g modifier on your RE). poj's addition of the parenthesis around the variable assignment changes the context to 'array context'. The results of a capture in scalar context return the number of matches, and in array context return the matches themselves.

--MidLifeXis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found