Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
While these file tests are fine for testing various attributes
regarding a particular file or filehandle, they don’t tell you the whole
story. For example, there’s no file test that returns the number of
links to a file or the owner’s user ID (uid). To get at the remaining
information about a file, merely call the stat function, which returns pretty much
everything that the stat Unix system
call returns (hopefully more than you want to know).[312] The operand to stat is
a filehandle (including the _ virtual
filehandle), or an expression that evaluates to a filename. The return
value is either the empty list, indicating that the stat failed (usually because the file doesn’t
exist), or a 13-element list of numbers, most easily described using the
following list of scalar variables: