in reply to Duplicates in Directories
Is there a more effcient method?
Probably, but without seeing any code we'd just be guessing. Perhaps you've got some nested loops that could be implemented more efficiently, like with a hash lookup. If you could post a Short, Self-Contained, Correct Example, we could make suggestions for optimizing it.
I prefer matching to equality, as some 'dups' might have minor variations in characters.
It sounds like that is not something you will be able to do with regexes, but there are Perl modules available to help you, see for example Edit distance between two strings for some suggestions.
|
|---|