perl-5.38.0
readpipe EXPR
readpipe

EXPR is executed as a system command. The collected standard output of the command is returned. In scalar context, it comes back as a single (potentially multi-line) string. In list context, returns a list of lines (however you've defined lines with $/ (or $INPUT_RECORD_SEPARATOR in English)). This is the internal function implementing the qx/EXPR/ operator, but you can use it directly. The qx/EXPR/ operator is discussed in more detail in "qx/STRING/" in perlop. If EXPR is omitted, uses $_.

EXPR がシステムコマンドとして実行されます。 コマンドの標準出力の内容が返されます。 スカラコンテキストでは、単一の(内部的に複数行の)文字列を返します。 リストコンテキストでは、行のリストを返します (但し、行は $/ (または English モジュールでは $INPUT_RECORD_SEPARATOR で定義されます)。 これは qx/EXPR/ 演算子を実装する内部関数ですが、直接使うことも出来ます。 qx/EXPR/ 演算子は "qx/STRING/" in perlop でより詳細に 述べられています。 EXPR が省略されると、$_ を使います。