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)
In reply to Re: convert a given dir name to its absolute path
by rinceWind
in thread convert a given dir name to its absolute path
by azaria
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |