in reply to Similarities in Different Directories

If you cannot rely on identical files having identical names, then you'll probably want to use some sort of digest function that gives identical file (contents) identical digest values. Then, at least you can compare only the files with the same digest, since those with differing digests cannot be identical. I haven't used the CPAN digest functions myself, but Gisle Aas is a reliable contributer (to say the least), so Digest::file is a good place to look for something that will do a fine job.

  • Comment on Re: Similarities in Different Directories

Replies are listed 'Best First'.
Re^2: Similarities in Different Directories
by dhaneypood (Novice) on Apr 15, 2011 at 18:23 UTC
    Yeah, I thought of using digest for the files, in fact, I am already doing that to check for same files with different names, but I am more interested in Directory Structure, more like can I compare two directory paths, and try and conclude they are the similar.

    And its not just one directory I am trying to find a match, I wish I can store a kind of map for some directories in db and search for similar maps.
    Thanks. :)