summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntosh <jmac@jmac.org>2020-04-17 22:34:45 -0400
committerKarl Williamson <khw@cpan.org>2020-04-28 11:05:34 -0600
commit6ede073e090b942866880feeb75ecab200706e30 (patch)
tree49d1ad5bf7d65b046e9f882953401e53edb8ea08
parentf70786324b62057696468910a5b972e14c10ee0e (diff)
downloadperl-6ede073e090b942866880feeb75ecab200706e30.tar.gz
Clarifying the note about "list form" and Windows.
-rw-r--r--pod/perlfunc.pod13
1 files changed, 6 insertions, 7 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 2732eecbf7..e95c54f425 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4719,13 +4719,12 @@ The following blocks are more or less equivalent:
open(my $fh, "-|", "cat", "-n", $file);
The last two examples in each block show the pipe as "list form", which
-is not yet supported on all platforms. A good rule of thumb is that if
-your platform has a real L<C<fork>|/fork> (e.g. your platform is Unix,
-including Linux and macOS, or you're using Perl 5.22 or later with
-Windows), you can use the list form. You would want to use the list
-form of the pipe so you can pass literal arguments to the command
-without risk of the shell interpreting any shell metacharacters in them.
-However, this also bars you from opening pipes to commands that
+is not yet supported on all platforms. (If your platform has a real
+L<C<fork>|/fork>, such as Linux and macOS, you can use the list form; it
+also works on Windows with Perl 5.22 or later.) You would want to use
+the list form of the pipe so you can pass literal arguments to the
+command without risk of the shell interpreting any shell metacharacters
+in them. However, this also bars you from opening pipes to commands that
intentionally contain shell metacharacters, such as:
open(my $fh, "|cat -n | expand -4 | lpr")