nysus has asked for the wisdom of the Perl Monks concerning the following question:
I have a per script in ~/bin/ that I'm calling from another directory. I tried using `getcwd()` to get the current working directory where the script was called from but it is returning undefined. How can I get the directory the script's command is getting issued from?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Determining directory where script was called from
by thanos1983 (Parson) on Mar 13, 2019 at 10:20 UTC | |
|
Re: Determining directory where script was called from
by nysus (Parson) on Mar 13, 2019 at 02:42 UTC | |
by Athanasius (Archbishop) on Mar 13, 2019 at 06:08 UTC |