http://www.perlmonks.org?node_id=859615


in reply to Detecting whether two pathes refer to the same file

A quick look on CPAN turns up File::Same and File::is, both of which do file comparisons (Including checking if it is the 'same' file in different locations), so specific mention of symlinks, but they use the INODE approach for comparisons so it should be workable.

File::is is much newer though. I haven't tested/used either, and there may well be others, but this seems to be a problem a lot of other people have thought about, so I am sure a good solution exists out there! Hope this helps!

Just a something something...