Amit Sharma wrote: > Hi All, > > I need your help to compare the file timestamp of 2 different files. > Please suggest how can I do this in perl.
Use 'stat' to fetch the create, modify, or inode change time of the files. Then compare them as numbers: my ($file1, $file2); my ($atime1, $mtime1, $ctime1) = (stat $file1)[8..10]; my ($atime2, $mtime2, $ctime2) = (stat $file2)[8..10]; my $mdiff = $mtime2 - $mtime1; HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
