| Jeff Abrahamson on 18 Oct 2003 13:49:44 -0400 |
|
Silly question, I think:
I have two files, $file1 and $file2. I want to say
if($file1 is newer than $file2) {
do something
}
I'm sort of embarrassed by this question, but the point is just that I
kind of recall there being a one-line way of doing this with file
tests or something, and I'm not finding it.
I know how to do it with two explicit stat calls and then comparing
mtime's.
--
Jeff
Jeff Abrahamson <http://www.purple.com/jeff/>
GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B
Attachment:
pgpIih7jIQdv5.pgp
|
|