Welcome to the Monastery | |
PerlMonks |
Re: Directory listing for a date rangeby jettero (Monsignor) |
on Jan 11, 2007 at 17:45 UTC ( [id://594205]=note: print w/replies, xml ) | Need Help?? |
Without getting into specific implementation details; personally, I'd store a Digest::SHA1 hash along with a file size and date stamp in a file or database table. There is a risk of collisions, but it's probably pretty small if you also compare the file size.
To make sure it worked right even when there were no databases to connect to, I'd probably use DB_File or Storable. Even DBD::SQLite would be an excellent choice for that. I think it's largely a matter of preference, but if you like the look of Storable.pm, be sure to think about splitting it up by month and/or directory. Otherwise, reparsing that file into memory every time the program runs could get expensive. Then, when you need to generate file change reports, you can just work off the simple database and you're done! -Paul
In Section
Seekers of Perl Wisdom
|
|