in reply to Re: Collapsing paths
in thread Collapsing paths
canonpath in File::Spec seems to do the trick.
Did you try it out?
#!/usr/bin/perl use File::Spec; print File::Spec->canonpath("foo/../bar/../baz/")."\n";
Output:
foo/../bar/../baz
I guess not. Did you read the docs? Quote:
Note that this does *not* collapse x/../y sections into y. This is by design.I guess not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Collapsing paths
by ikegami (Patriarch) on Dec 05, 2007 at 16:57 UTC | |
|
Re^3: Collapsing paths
by lodin (Hermit) on Dec 05, 2007 at 20:34 UTC |