in reply to Directory comparison

Here's a little idea for you. If you are just checking modified times and not actual content, you can simple do something like:

  1. Do a File::Find on the old directory structure
  2. Store the information in a hash with the filenames(with full paths) as keys and the modified date/time as the value.
  3. Once you finish, do a File::Find on the new directory structure
  4. Compare the modify date/times of the new files with what you have stored for the old files

I don't know how many files you are talking about? Thousands? Millions? Don't underestimate Perl's speed, if all you are checking is modify times then your bottleneck will be the Disk I/O not your script. And that would be the case with other solutions as well. If you are concerned about time and efficiency, you can separate the two loops above and have the resulting hash from the File::Find on the old directory structure stored using the Storable module. That way you can cache the mod times of the files before you need to compare them to the new directory structure and then just retrieve them when you run the script against the new directory.

HTH