Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: comparing 2 file time date stamps ( Path::Tiny File::stat Time::Piece )

by craigt (Acolyte)
on Nov 04, 2014 at 13:49 UTC ( #1106034=note: print w/replies, xml ) Need Help??


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 was for both files

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 Anonymous Monk on Nov 05, 2014 at 04:38 UTC

    I tried ... stuff I did not recommend

    Sorry dude :) Time::Piece is the core module with the neato API that stop you from having to do + 1900 nonsense ...

    $ perl -e " use Time::Piece; print localtime->year,$/ " 2014

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2022-08-18 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?