Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by craigt (Acolyte)
on Nov 04, 2014 at 13:53 UTC ( [id://1106035]=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 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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found