in reply to Re: Re: Multiple matches of a regex
in thread Multiple matches of a regex

If you have anything against substr calls you can do this symbolically (through more people will probably have something against this than repeated substr calls).
no strict 'refs'; my @groups = map $$_, 1 .. $#+;
If I shall be picky, in your question you wanted the first match to return   ['11', '30', undef] while in your reply you said   ['11', '30'] is what you want. As I pointed out here you should consider the difference between $#+ and $#-. Also, unmatched groups would be '' with your code. Perhaps that's what you want, but it won't be fully analogous to using the $<DIGITS> variables. If done symbolically it sure will be analogous though, since you actually use the $<DIGITS> variables.

Hope I've helped,
ihb