You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit f3a5b2b22f875a08c4d1253a866327c4551f0d73)
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 $_.