perldoc perlvms</code>
File tests
The tests "-b", "-B", "-c", "-C", "-d", "-e", "-f", "-o", "-M",
"-s", "-S", "-t", "-T", and "-z" work as advertised. The return
values for "-r", "-w", and "-x" tell you whether you can actually
access the file; this may not reflect the UIC-based file protec-
tions. Since real and effective UIC don't differ under VMS, "-O",
"-R", "-W", and "-X" are equivalent to "-o", "-r", "-w", and "-x".
Similarly, several other tests, including "-A", "-g", "-k", "-l",
"-p", and "-u", aren't particularly meaningful under VMS, and the
values returned by these tests reflect whatever your CRTL "stat()"
routine does to the equivalent bits in the st_mode field. Finally,
"-d" returns true if passed a device specification without an
explicit directory (e.g. "DUA1:"), as well as if passed a direc-
tory.
Note: Some sites have reported problems when using the file-access
tests ("-r", "-w", and "-x") on files accessed via DEC's DFS.
Specifically, since DFS does not currently provide access to the
extended file header of files on remote volumes, attempts to exam-
ine the ACL fail, and the file tests will return false, with $!
indicating that the file does not exist. You can use "stat" on
these files, since that checks UIC-based protection only, and then
manually check the appropriate bits, as defined by your C com-
piler's stat.h, in the mode value it returns, if you need an
approximation of the file's protections.