Re: absolute path of current process
- From: paul@xxxxxxxx (Paul Johnson)
- Date: Thu, 26 May 2005 12:55:25 +0200
On Thu, May 26, 2005 at 05:48:41AM -0500, Peter Rabbitson wrote:
> 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]);
perldoc FindBin
--
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net
.
- References:
- absolute path of current process
- From: Peter Rabbitson
- Re: absolute path of current process
- From: Peter Rabbitson
- absolute path of current process
- Prev by Date: Re: absolute path of current process
- Next by Date: Re: absolute path of current process
- Previous by thread: Re: absolute path of current process
- Next by thread: Re: absolute path of current process
- Index(es):
Relevant Pages
|