perl-5.38.0
${^OPEN}

An internal variable used by PerlIO. A string in two parts, separated by a \0 byte, the first part describes the input layers, the second part describes the output layers.

PerlIO で使われる内部変数です。 文字列は \0 で分割された二つの部分からなり、前半は入力層を、 後半は出力層を示します。

This is the mechanism that applies the lexical effects of the open pragma, and the main program scope effects of the io or D options for the -C command-line switch and PERL_UNICODE environment variable.

これは open プラグマおよび、io-C コマンドラインオプションPERL_UNICODE 環境変数D オプションの メインプログラムスコープにレキシカルな効果を適用するための機構です。

The functions accept(), open(), pipe(), readpipe() (as well as the related qx and `STRING` operators), socket(), socketpair(), and sysopen() are affected by the lexical value of this variable. The implicit "ARGV" handle opened by readline() (or the related <> and <<>> operators) on passed filenames is also affected (but not if it opens STDIN). If this variable is not set, these functions will set the default layers as described in "Defaults and how to override them" in PerlIO.

accept(), open(), pipe(), readpipe() (および関連する qx`STRING` 演算子), socket(), socketpair(), sysopen() 関数は、この変数のレキシカルな値に 影響を受けます。 readline() (や関連する <><<>> 演算子) に ファイル名を渡すことによって開かれた暗黙の "ARGV" も影響を受けます (しかし STDIN を開いている場合は影響を受けません)。 この変数が設定されていない場合、これらの関数は "Defaults and how to override them" in PerlIO で記述されている デフォルト層が設定されます。

open() ignores this variable (and the default layers) when called with 3 arguments and explicit layers are specified. Indirect calls to these functions via modules like IO::Handle are not affected as they occur in a different lexical scope. Directory handles such as opened by opendir() are not currently affected.

open() は、3 引数で呼び出され、明示的な層が指定された場合は この変数(およびデフォルト層)を無視します。 IO::Handle のようなモジュール経由でのこれらの関数の間接的な呼び出しは 影響を受けません; これらは異なったレキシカルスコープで起きるからです。 opendir() で開かれたようなディレクトリハンドルは現在の所 影響を受けません。

This variable was added in Perl v5.8.0.

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