Perl Monk, Perl Meditation | |
PerlMonks |
Re: How to get the unique canonical path of a given path?by rizzo (Curate) |
on Jul 13, 2022 at 23:05 UTC ( [id://11145508]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|