- 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_SEPARATORin English)). This is the internal function implementing theqx/EXPR/operator, but you can use it directly. Theqx/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 が省略されると、$_を使います。