stat

Returns a 13-element list giving the status info for a file, either
the file opened via FILEHANDLE or DIRHANDLE, or named by EXPR. If EXPR is
omitted, it stats $_
. Returns the empty list if stat fails. Typically
used as follows:

(*) Not all fields are supported on all filesystem types. Notably, the
ctime field is non-portable. In particular, you cannot expect it to be a
"creation time", see Files and Filesystems in perlport for details.

If stat is passed the special filehandle consisting of an underline, no
stat is done, but the current contents of the stat structure from the
last stat, lstat, or filetest are returned. Example: