in reply to Re^2: Replace duplicate files with hardlinks
in thread Replace duplicate files with hardlinks


I'd like to add that you can distinguish hardlinks by inode numbers. When you have your group of duplicate-content files, hash them by inode numbers:
push @{ $hash{$inode} }, $path;
When you have more than one key in the hash, decide which hardlink's inode you like and link the other paths to it.

When you have only one key in the hash, you're done!