summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2020-08-27 12:19:44 +1000
committerKarl Williamson <khw@cpan.org>2020-08-27 14:51:04 -0600
commite275abc06263fc695a06f3deb147e050a3bd1411 (patch)
tree203e8240fee6a97e2fa7fab79bf8c202cc3a39cc /pod
parentcd304e76e0a975a4d5600077b2891ed469708009 (diff)
downloadperl-e275abc06263fc695a06f3deb147e050a3bd1411.tar.gz
clarify that errno can be set to non-zero on success
Diffstat (limited to 'pod')
-rw-r--r--pod/perlvar.pod5
1 files changed, 3 insertions, 2 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 09b83bee50..4812f0d9c6 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -1905,8 +1905,9 @@ corresponding to C<errno>.
Many system or library calls set C<errno> if they fail,
to indicate the cause of failure. They usually do B<not>
-set C<errno> to zero if they succeed. This means C<errno>,
-hence C<$!>, is meaningful only I<immediately> after a B<failure>:
+set C<errno> to zero if they succeed and may set C<errno> to a
+non-zero value on success. This means C<errno>, hence C<$!>, is
+meaningful only I<immediately> after a B<failure>:
if (open my $fh, "<", $filename) {
# Here $! is meaningless.