in reply to Re: cleaning up absolute path without resolving symlinks
in thread cleaning up absolute path without resolving symlinks

Depending on how cross-platform you need to be, you might use updir() and related functions from File::Spec instead of ...