in reply to Re: Re: Re: pattern matching on a single line
in thread How do I store all matches from a single line?
He's using map to collect the results into one list. Like foreach, it will iterate over the list specified at the right. But it will also collect together the results into one list. The regex content will return a list of all matches made (thanks to /g), and map will nicely concatenate all those together into one big list.