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

Teeny-tiny doco-patch for -X

Thread Next
From:
David Cantrell
Date:
October 30, 2018 17:54
Subject:
Teeny-tiny doco-patch for -X
Message ID:
20181030175450.GA31089@bytemark.barnyard.co.uk
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About