- $<digits> ($1, $2, ...)
-
Contains the subpattern from the corresponding set of capturing parentheses from the last successful pattern match, not counting patterns matched in nested blocks that have been exited already.
最後に成功したパターンマッチングで対応する括弧のサブパターンにマッチングした 文字列が入っているが、既に抜けてしまったブロックでの パターンマッチングは勘定に入れません。
Note there is a distinction between a capture buffer which matches the empty string a capture buffer which is optional. Eg,
(x?)
and(x)?
The latter may be undef, the former not.空文字列にマッチングする捕捉バッファと、オプションの捕捉バッファの 違いに注意してください。 例えば、
(x?)
と(x)?
では、後者は undef かもしれませんが、 前者は違います。These variables are read-only and dynamically-scoped.
これらの変数はすべて読み込み専用で、動的なスコープを持ちます。
Mnemonic: like \digits.
記憶法: \(数字) のようなもの。