in reply to Re: What's like $+ but not gives the ordinal?
in thread What's like $+ but not gives the ordinal?
The if to the array is interesting, but won't work for me because I'm doing a substitution, not just a match. The docs give an /G../gc idiom for lexing, but there is no equivilent for altering the parts not just detecting them.
As for kludgeing something together, since we're getting away from funny globals altogether, how about making a bold move and providing a variable named $Regexp::last_paren_match_count, or better yet @Regexp::matches that aliases the same values as $1, $2, etc. then they can be manipulated as an array in all the normal ways, index with -1, get array length, etc.
—John
|
|---|