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

See also File::Spec->canonpath(). If you like what it does, fine. If not, the documentation lists some of the pitfalls involved in this operation. File::Spec is a core module.

Replies are listed 'Best First'.
Re^2: How to get the unique canonical path of a given path?
by ikegami (Patriarch) on Jul 14, 2022 at 15:53 UTC

    It doesn't.

    They don't remove '..' because it might change the meaning of the path in case of symlinks.