xlim has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I wrote a script that changes the contents of a file. However, I would like to retain the timestamp for that file.
I have tried the stat() and utime. Assigning $mtime = stat ("$ARGV")[8]and attempting to change $mtime by doing
utime $atime, $mtime, $ARGV; seems to reset the timestamp to the epoch (1969).Thanks
Xlim
Edited: ~Fri Oct 18 21:32:21 2002 (GMT) by footpad: Added <code> and other HTML formatting tags, per Consideration
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: retaining TIMESTAMPS
by submersible_toaster (Chaplain) on Oct 18, 2002 at 07:14 UTC | |
|
Re: retaining TIMESTAMPS
by tadman (Prior) on Oct 18, 2002 at 06:55 UTC | |
|
Re: retaining TIMESTAMPS
by greenFox (Vicar) on Oct 18, 2002 at 08:26 UTC | |
by xlim (Novice) on Oct 18, 2002 at 14:01 UTC | |
by greenFox (Vicar) on Oct 21, 2002 at 01:33 UTC |