Re: absolute path of current process
- From: rabbit@xxxxxxxxx (Peter Rabbitson)
- Date: Thu, 26 May 2005 05:48:41 -0500
On Thu, May 26, 2005 at 05:38:50AM -0500, Peter Rabbitson wrote:
> Is this:
>
> my $path = [File::Spec->splitpath (File::Spec->rel2abs ($0))]->[1];
>
> the only OS independent (unix/win32) way to determine the absolute path of
> the directory which contains the current process, or there is a less cryptic
> way that I am overlooking?
>
My bad, to work on win32 it becomes even more cryptic:
my $path = join ('',@{[File::Spec->splitpath (File::Spec->rel2abs ($0))]}[0,1]);
.
- Follow-Ups:
- Re: absolute path of current process
- From: Paul Johnson
- Re: absolute path of current process
- References:
- absolute path of current process
- From: Peter Rabbitson
- absolute path of current process
- Prev by Date: absolute path of current process
- Next by Date: Re: absolute path of current process
- Previous by thread: absolute path of current process
- Next by thread: Re: absolute path of current process
- Index(es):
Relevant Pages
|