readpipe
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
). 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 I/O Operators in perlop. If EXPR is omitted, uses $_
.
© 1993–2016 Larry Wall and others
Licensed under the GNU General Public License version 1 or later, or the Artistic License.
The Perl logo is a trademark of the Perl Foundation.
https://perldoc.perl.org/5.22.0/functions/readpipe.html