Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: Re: pattern matching on a single line

by lestrrat (Deacon)
on Jun 05, 2001 at 21:13 UTC ( [id://86016]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: Re: pattern matching on a single line
in thread How do I store all matches from a single line?

map actually returns the result of EXPR in LIST context. That means each evaluation of

/<(.*?)>/g

returns the list of captured items. So in effect we get

@result = ( ( result of evaluating first element ), ( result of evaluating second element ), ....);

So the resulting array is one big array with all of the matches that EXPR produced

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://86016]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.