From a2008d6d9087873a23da5012f181cb674dbf4ab1 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 22 Jun 1998 01:14:14 +0000 Subject: merge relevant portions from maintbranch change#1155 p4raw-link: @1155 on //depot/maint-5.004/perl: c7664d5b6ade225b1576289e62712eec26808f84 p4raw-id: //depot/perl@1186 --- pod/perlfunc.pod | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pod/perlfunc.pod') diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 31367ed07b..bfb1c30577 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3836,7 +3836,17 @@ the new position. Does exactly the same thing as "exec LIST" except that a fork is done first, and the parent process waits for the child process to complete. Note that argument processing varies depending on the number of -arguments. The return value is the exit status of the program as +arguments. If there is more than one argument in LIST, or if LIST is +an array with more than one value, starts the program given by the +first element of the list with arguments given by the rest of the list. +If there is only one scalar argument, 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 execvp(), which is more efficient. + +The return value is the exit status of the program as returned by the wait() call. To get the actual exit value divide by 256. See also L. This is I what you want to use to capture the output from a command, for that you should use merely backticks or -- cgit v1.2.1