Perl global matching
For each substring that matches a regex on a given line, I want to call a subroutine on that matching substring. Since I am matching in a list context with a regex that has groups, each iteration returns a group from the last substring that matched the regex. How do I return the matching substring each iteration? Thanks.
|