in reply to Re^3: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )
in thread comparing 2 file time date stamps

I tried
use File::stat; use Time::localtime; $dd[11] = ctime(stat("$xxfn1")->mtime); $dd[12] = ctime(stat("$xxfn2")->mtime);
The result for both files was

Mon Nov 3 11:57:55 2014

which is the stamp of the file not in the staging directory.

All methods seem to return the same modification date for both files, even though the file dates are 11/3 and 11/2, respectively.
  • Comment on Re^4: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )
  • Download Code

Replies are listed 'Best First'.
Re^5: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )
by GotToBTru (Prior) on Nov 04, 2014 at 15:18 UTC

    I don't think you want or need the quotes around the file variables. These modules work, they must be being applied to files other than the ones you intend. What is the output if you add the following immediately before you use the ctime function?

    printf "File 1:%s File 2: %s\n", $xxfn1, $xxfn2;
    1 Peter 4:10