summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-05-11 00:09:53 +0000
committerSteve Peters <steve@fisharerojo.org>2006-05-11 00:09:53 +0000
commit3039822776c822d43b60790fc6d383f78daf60de (patch)
tree07126d1611cc21de61d53e6b791dc90451cc4472 /pod
parentf88ad25708e2ee09c318081130c8106f3d340846 (diff)
downloadperl-3039822776c822d43b60790fc6d383f78daf60de.tar.gz
Adding a mention of STDIN processing by qx// as requested by
RT #34288: perlop: qx/STRING/: mention STDIN p4raw-id: //depot/perl@28156
Diffstat (limited to 'pod')
-rw-r--r--pod/perlop.pod9
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 442c313c84..4dffa4f1b5 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -1340,6 +1340,15 @@ when the program is done:
system("program args 1>program.stdout 2>program.stderr");
+The STDIN filehandle used by the command is inherited from Perl's STDIN.
+For example:
+
+ open BLAM, "blam" || die "Can't open: $!";
+ open STDIN, "<&BLAM";
+ print `sort`;
+
+will print the sorted contents of the file "blam".
+
Using single-quote as a delimiter protects the command from Perl's
double-quote interpolation, passing it on to the shell instead: