Nelly has asked for the wisdom of the Perl Monks concerning the following question:
my $dir1=$0;
but it gives me the directory with the file , for example c:\perl\exmp.pl and I need only c:\perl\.Thank you.
janitored by ybiC: Retitle from less-than-descriptive "the corrent location" for better site searching, and minor format tweaks for legibility.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to obtain current working directory
by davido (Cardinal) on Mar 23, 2004 at 09:28 UTC | |
|
Re: How to obtain current working directory
by davis (Vicar) on Mar 23, 2004 at 09:39 UTC | |
|
Re: How to obtain current working directory
by Aragorn (Curate) on Mar 23, 2004 at 09:38 UTC | |
|
Re: How to obtain current working directory
by pelagic (Priest) on Mar 23, 2004 at 09:49 UTC | |
|
Re: How to obtain current working directory
by eserte (Deacon) on Mar 23, 2004 at 12:13 UTC | |
by pelagic (Priest) on Mar 23, 2004 at 12:27 UTC |