Are you sure they're duplicates?
Unless I'm very much mistaken, (certainly on UNIX) you cannot have files/directories/special files with the same name in a given directory.
Update:
Doh! Across an entire directory tree it's possible (obviously) to have duplicated names.
You should probably look at
$File::Find::dir and $File::Find::name from File::Find's wanted() method to distinguish between a non-uniquely named files/directories by location.
Update 2: Use a hash.
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.