in reply to Re^2: Why are 5.10's named captures read only?
in thread Why are 5.10's named captures read only?
will do fine. Personally, I'd like the values being arrays of arrays, the inner arrays 2 elements, the index of the start of the match, and the index just after the end of the match. (that is, similar to @- and @+). The outer array will hold as many captures with that name there are, so if you have:%{^MATCH_OFFSETS}
the result is:"abc" =~ /(?<l>[a-z])(?<l>[a-z])(?<l>[a-z])/
%{^MATCH_OFFSETS} = ('l' => [[0, 1], [1, 2], [2. 3]]);
I'm also pretty sure that if someone write a patch, it will be added to Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why are 5.10's named captures read only?
by blazar (Canon) on Oct 20, 2008 at 12:55 UTC |