How can I get the high-res mtime for a symbolic link in Perl? <p>I want to reproduce the output of <code>ls --full-time</code> from a Perl script to avoid the overhead of calling <code>ls</code> several thousand times. I was hoping to use the <a href="http://perldoc.perl.org/functions/stat.html" rel="nofollow noreferrer">stat</a> function and grab all the information from there. However, the timestamp in the ls output uses the high-resolution clock so it includes the number of nanoseconds as well (according to the GNU docs, this is because --full-time is equivalent to <code>--format=long --time-style=full-iso</code>, and the full-iso time style includes the nanoseconds).</p> <p>I came across the <a href="http://perldoc.perl.org/Time/HiRes.html" rel="nofollow noreferrer">Time::HiRes</a> module, which overrides the standard stat function with one that returns atime/mtime/ctime as floating point numbers, but there's no override for <a href="http://perldoc.perl.org/functions/lstat.html" rel="nofollow noreferrer">lstat</a>. This is a problem, because calling stat on a symlink returns info for the linked file, not for the link itself.</p> <p>So my question is this - where can I find a version of lstat that returns atime/mtime/ctime in the same way as Time::HiRes::stat? Failing that, is there another way to get the modtime for a symlink in high resolution (other than calling ls).</p>