http://www.perlmonks.org?node_id=1011449

gepebril69 has asked for the wisdom of the Perl Monks concerning the following question:

I want to use the function stat to determine the last modified date of a file. This can be done by

$FileTimeLastMod = (stat ($FileName))[9];

But how to detect if something in this function call fails? There is a brief description on the manual page of Perl, but I can't figure out what they mean. English is not my native tongue:

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 $_ (not _ !). Returns the empty list if stat fails.

What is the code I have to use? Thanks in advance