Thanks Matt, I was guessing it had something to do with symlinks but hadn't put all the pieces together. Interestingly (or not) the colleague who originally asked me the question was working on Win32 which doesn't do symlinks but even on that platform, File::Spec::Win32 still leaves the '..' parts in place.
The no_upwards() method doesn't quite seem to do what I need either (I had tried it before I posted originally). It takes a list of pathname components and all it does is eliminate the '.' and '..' components (ie: it doesn't remove the component before the '..') - I'm not sure when that would be useful. Even it it did what I wanted, by the time I'd called splitdir() to provide the right inputs and then catdir() to reassemble the output, the end result would hardly be a clear and concise piece of code.
I guess I'll stick with my URI solution. Thanks again.
In reply to Re: Re: Absolute pathnames from relative?
by grantm
in thread Absolute pathnames from relative?
by grantm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |