--- name: stat status: documented runtime: pp source: src/runtime/pp/filesystem.rs --- ```{index} single: stat; Perl built-in (pp runtime) ``` # stat ## Synopsis ```perl my @s = stat($file); my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat($file); stat $fh; # stat on a filehandle stat _; # reuse last stat buffer ``` ## Description Returns file metadata as a 13-element list. Returns a 13-element list giving the status info for a file. The elements are: dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks. Follows symbolic links (use `lstat` to stat the link itself). Returns an empty list on failure. When `Time::HiRes::stat` has been imported into the caller's namespace, the atime/mtime/ctime fields are returned as floating-point seconds with nanosecond precision. ## See also lstat, chmod, chown