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


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

From the question at stackoverflow you cited:
Normalize a pathname by collapsing redundant separators and up-level references so that A//B, A/B/, A/./B and A/foo/../B all become A/B.
Given this task, it makes no sense to start your path with a double dot because the directory above your first one, the one you want to change to, is not known. Same thing with /a/../../b, etc.