John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
The Problem: Given two paths that are expressed relative to the same starting point, express the first as a relative path from the second.
Example, given a\b\c to a\b\d, return ..\d .
I'm sure I can figure this out easily enough, so I'm not asking anyone to do it for me. But sharing code that's already been tested is another story! Since there is abs2rel and other goodies in File::Spec, I'm wondering if there is already a function that does this somewhere, so I don't have to write one.
Anybody seen it?
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: relative paths
by japhy (Canon) on Nov 26, 2001 at 10:33 UTC | |
|
Re: relative paths
by merlyn (Sage) on Nov 26, 2001 at 18:47 UTC | |
by John M. Dlugosz (Monsignor) on Nov 27, 2001 at 03:27 UTC | |
|
Re: relative paths
by clemburg (Curate) on Nov 27, 2001 at 00:16 UTC |