List of Perl's file test operators
Perl File Test Operators
File is readable by effective uid/gid.
File is writable by effective uid/gid.
File is executable by effective uid/gid.
File is owned by effective uid.
File is readable by real uid/gid.
File is writable by real uid/gid.
File is executable by real uid/gid.
File is owned by real uid.
File has zero size (is empty).
File has nonzero size (returns size in bytes).
File is a plain file.
File is a directory.
File is a symbolic link (false if symlinks aren't supported by the file system).
File is a named pipe (FIFO), or Filehandle is a pipe.
File is a socket.
File is a block special file.
File is a character special file.
Filehandle is opened to a tty.
File has setuid bit set.
File has setgid bit set.
File has sticky bit set.
File is an ASCII or UTF-8** text file (heuristic guess).
File is a "binary" file (opposite of -T).
Script start time minus file modification time, in days.
Same for access time.
Same for inode change time (Unix, may differ for other platforms)
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!