From: Jarkko Hietaniemi Date: Thu, 17 Aug 2000 22:38:16 +0000 (+0000) Subject: Document what the backtick returns if the command fails. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=43dd4d2146112dca2aa15fc1e2f00ffa207319c5;p=p5sagit%2Fp5-mst-13.2.git Document what the backtick returns if the command fails. p4raw-id: //depot/perl@6682 --- diff --git a/pod/perlop.pod b/pod/perlop.pod index 0f83ed1..9b4dbaf 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -997,13 +997,14 @@ for a detailed look at the semantics of regular expressions. =item `STRING` -A string which is (possibly) interpolated and then executed as a system -command with C or its equivalent. Shell wildcards, pipes, -and redirections will be honored. The collected standard output of the -command is returned; standard error is unaffected. In scalar context, -it comes back as a single (potentially multi-line) string. In list -context, returns a list of lines (however you've defined lines with $/ -or $INPUT_RECORD_SEPARATOR). +A string which is (possibly) interpolated and then executed as a +system command with C or its equivalent. Shell wildcards, +pipes, and redirections will be honored. The collected standard +output of the command is returned; standard error is unaffected. In +scalar context, it comes back as a single (potentially multi-line) +string, or undef if the command failed. In list context, returns a +list of lines (however you've defined lines with $/ or +$INPUT_RECORD_SEPARATOR), or an empty list if the command failed. Because backticks do not affect standard error, use shell file descriptor syntax (assuming the shell supports this) if you care to address this.