in reply to How to get the unique canonical path of a given path?

readlink -f is the bash command to resolve this. This may help you discover the answer for Perl. Perl has readlink, but YMMV.