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

The return value of m/()/g in array context (which map evaluates EXPR in) is the array containing all the matches inside the parentheses, just like in your first reply. The only difference that the map makes is that merlyn is evaluating the m/()/g for every line, while yours only did one line.

HTH.

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.

Replies are listed 'Best First'.
Re: (bbfu) Re(4): pattern matching on a single line
by FouRPlaY (Monk) on Jun 05, 2001 at 23:44 UTC
    Gotcha, I just needed to be more clear. I thought it was implied that they'd have to use that line of code in a loop over each line. I'll make sure I'm more specific next time. Thanks.



    FouRPlaY
    Learning Perl or Going To die() Trying