This array holds the offsets of the ends of the last successful submatches in the currently active dynamic scope.$+[0]
is the offset into the string of the end of the entire match. This is the same value as what thepos
function returns when called on the variable that was matched against. Thenth element of this array holds the offset of thenth submatch, so$+[1]
is the offset past where $1 ends,$+[2]
the offset past where $2 ends, and so on. You can use$#+
to determine how many subgroups were in the last successful match. See the examples given for the@-
variable.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.