rovf has asked for the wisdom of the Perl Monks concerning the following question:
Consider I have two string $x and $y, for which
is true. Is there an easy way (speak: a standard function, a CPAN module etc.) to find out whether $x and $y denote the same directory?-d $x && -d $y
I have considered File::Spec::Functions::canonpath, but even if the canonical path differes, the directories could be the same, although their string representation is different.
On Unix, for instance, $y could be a symlink to $x.
On Windows, $x might be a representation of the directory using a drive letter, and $y might be the same directory using the UNC path notation (if it is a networked directory).
|
|---|