Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL readpipe Function
Syntax
Definition and Usage
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.
Return Value
Example
Try out following example:
#!/usr/bin/perl -w
@result = readpipe( "ls -l /tmp" );
print "@result";
|
It will produce following results: This will give whole content in /tmp directory.
drwxr-xr-x 2 root root 4096 Mar 19 11:55 testdir
| |
|

|
|
|