develooper Front page | perl.perl5.porters | Postings from October 2018

Teeny-tiny doco-patch for -X

Thread Next
David Cantrell
October 30, 2018 17:54
Teeny-tiny doco-patch for -X
Message ID:
I just got bit by -e returning false when there was a symlink in place
that pointed to a non-existent file. So ...

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 9394e22343..4c3d3f96c1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -535,7 +535,7 @@ operator.  The operator may be any of:
     -X  File is executable by real uid/gid.
     -O  File is owned by real uid.
-    -e  File exists.
+    -e  File exists (NB returns false for dangling symlinks).
     -z  File has zero size (is empty).
     -s  File has nonzero size (returns size in bytes).

David Cantrell

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About