in reply to convert a given dir name to its absolute path
use Cwd qw/abs_path/;
Note that whilst File::Spec->rel2abs may give you the right answer sometimes, abs_path will give you the canonical path. rel2abs works by platform specific string manipulation, but abs_path asks the operating system for the path, on some platforms by doing a chdir followed by a pwd.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: convert a given dir name to its absolute path
by xdg (Monsignor) on Dec 22, 2005 at 14:04 UTC | |
|
Re^2: convert a given dir name to its absolute path
by tirwhan (Abbot) on Dec 22, 2005 at 12:45 UTC | |
|
Re^2: convert a given dir name to its absolute path
by azaria (Beadle) on Dec 22, 2005 at 12:52 UTC | |
by azaria (Beadle) on Dec 22, 2005 at 12:56 UTC | |
by azaria (Beadle) on Dec 22, 2005 at 13:01 UTC |