From 667eac0cd75b24849e65753cb51d9a6b8111c052 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Wed, 29 Jan 2014 11:38:30 -0500 Subject: [PATCH] remove redundancy in documentation of exec exec's behavior is determined by the count of items in LIST, and not by whether it's an array. --- pod/perlfunc.pod | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a951ec2..8dc9f0f 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1973,15 +1973,13 @@ with some other statement, you can use one of these styles to avoid the warning: exec ('foo') or print STDERR "couldn't exec foo: $!"; { exec ('foo') }; print STDERR "couldn't exec foo: $!"; -If there is more than one argument in LIST, or if LIST is an array -with more than one value, calls execvp(3) with the arguments in LIST. -If there is only one scalar argument or an array with one element in it, -the argument is checked for shell metacharacters, and if there are any, -the entire argument is passed to the system's command shell for parsing -(this is C on Unix platforms, but varies on other platforms). -If there are no shell metacharacters in the argument, it is split into -words and passed directly to C, which is more efficient. -Examples: +If there is more than one argument in LIST, this calls execvp(3) with the +arguments in LIST. If there is only one element in LIST, the argument is +checked for shell metacharacters, and if there are any, the entire +argument is passed to the system's command shell for parsing (this is +C on Unix platforms, but varies on other platforms). If +there are no shell metacharacters in the argument, it is split into words +and passed directly to C, which is more efficient. Examples: exec '/bin/echo', 'Your arguments are: ', @ARGV; exec "sort $outfile | uniq"; -- 2.7.4