[X-Unix] How to get working directory in a perl script?
Jerry Krinock
jerry at ieee.org
Sun Apr 6 17:25:52 PDT 2008
On 2008 Apr, 06, at 15:01, Stewart C. Russell wrote:
> use Cwd qw(chdir);
Thank you, Stewart. It works. From the CPAN documentation [1], under
subhead "$ENV{PWD}", I read that
"If you ask to override your chdir() built-in function,
use Cwd qw(chdir);
then your PWD environment variable will be kept up to date. Note that
it will only be kept up to date if all packages which use chdir import
it from Cwd."
Sheesh. "What will they think of next??" I am going to our little
greenhouse to plant some more lettuce seeds now.
[1] http://search.cpan.org/~kwilliams/PathTools-3.2701/Cwd.pm
More information about the X-Unix
mailing list