Perl functions references-readpipe Function - Perl Scripting

What is readpipe function?


This function executes EXPR as a command. The output is then returned as a multiline string in scalar text, or with the line returned as individual elements in a list context.


Following is the simple syntax for this function −

Return Value

This function returns String in Scalar Context and returns List in List Context.


Following is the example code showing its basic usage −

When above code is executed, it produces the following result. This will give whole content in /tmp directory −

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Perl Scripting Topics