in reply to Re: Perl Stat Issue
in thread Perl Stat Issue

Update: It seems that actually saying use File::stat is the culript.... when commenting this out, I get an epoch time. Why the heck is this the case? Is File::stat not correctly where I assumed it was?

Replies are listed 'Best First'.
Re^3: Perl Stat Issue
by CountZero (Bishop) on Jun 26, 2013 at 19:10 UTC
    Well, you added the use stat; line so you should have read that module's documentation which says:
    This module's default exports override the core stat() and lstat() functions, replacing them with versions that return "File::stat" objects. This object has methods that return the similarly named structure field name from the stat(2) function; namely, dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics