broquaint has asked for the wisdom of the Perl Monks concerning the following question:
However, the above code tells you where the script is being executed from souse Cwd; print cwd()."\n";
works fine and dandy but this isn't so good# /usr/local/src/perl/> perl test.pl /usr/local/src/perl
as I still want to get /usr/local/src/perl as that's where it lives.# /home/foobar/> perl /usr/local/src/perl/test.pl /home/foobar
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Where the perl scripts live...
by suaveant (Parson) on Sep 07, 2001 at 20:57 UTC | |
by broquaint (Abbot) on Sep 07, 2001 at 21:09 UTC | |
by tye (Sage) on Sep 08, 2001 at 00:01 UTC | |
|
Re: Where the perl scripts live (Russ - 'use lib' hack)
by Russ (Deacon) on Sep 07, 2001 at 21:01 UTC | |
|
Re: Where the perl scripts live...
by LD2 (Curate) on Sep 07, 2001 at 21:00 UTC | |
|
Re: Where the perl scripts live...
by John M. Dlugosz (Monsignor) on Sep 07, 2001 at 20:47 UTC |