perl-5.38.0
@LAST_MATCH_END
@+

This array holds the offsets of the ends of the last successful match and any matching capture buffers that the pattern contains. (See "Scoping Rules of Regex Variables")

この配列は、最後に成功したマッチングの末尾へのオフセットと、 パターンが含むすべてのマッチング捕捉バッファを保持します。 ("Scoping Rules of Regex Variables" を参照してください。)

The number of elements it contains will be one more than the number of capture buffers in the pattern, regardless of which capture buffers actually matched. You can use this to determine how many capture buffers there are in the pattern. (As opposed to @- which may have fewer elements.)

The number of elements it contains will be one more than the number of capture buffers in the pattern, regardless of which capture buffers actually matched. You can use this to determine how many capture buffers there are in the pattern. (As opposed to @- which may have fewer elements.) (TBT)

$+[0] is the offset into the string of the end of the entire match. This is the same value as what the pos function returns when called on the variable that was matched against. The nth element of this array holds the offset of the nth 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.

$+[0] はマッチ全体の文字列の最後へのオフセットです。 これはマッチした変数に対して pos 関数を呼び出したときの返り値と同じです。 この配列の n 番目の要素は n 番目のサブマッチのオフセットを 保持しているので、$+[1] は過去の $1 の終わりのオフセット、$+[2]$2 のオフセット、という形になります。 $#+ は最後に成功したマッチでいくつサブグループがあるかを決定するのに 使えます。 @- 変数の例を参照して下さい。

This variable is read-only, and its value is dynamically scoped.

この変数は読み込み専用で、その値は動的スコープを持ちます。

This variable was added in Perl v5.6.0.

この変数は Perl v5.6.0 で追加されました。