jethro has asked for the wisdom of the Perl Monks concerning the following question:
perldoc Cwd says if you override chdir with Cwd's chdir, then your PWD environment stays up-to-date. But this perl snippet:
called from the root dir outputs just#!/usr/local/bin/perl -w use strict; use Cwd; use Cwd 'chdir'; chdir '/x/y/z'; print getcwd(),"\n";
And yes, /x/y/z did exist.
I tried this on Solaris8 and Suse Linux 9.1 with perl versions 5.005 and 5.8.5.
Any idea?
****** UPDATE:
I shouldn't have skipped lunch. It was a simple typo in the path name.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: function chdir in Module Cwd broken?
by ikegami (Patriarch) on Nov 08, 2004 at 20:43 UTC | |
Re: function chdir in Module Cwd broken?
by Aighearach (Initiate) on Nov 08, 2004 at 20:39 UTC | |
by ikegami (Patriarch) on Nov 08, 2004 at 20:50 UTC | |
by Aighearach (Initiate) on Nov 08, 2004 at 21:04 UTC | |
by Fletch (Bishop) on Nov 08, 2004 at 21:52 UTC | |
by Aighearach (Initiate) on Nov 08, 2004 at 22:00 UTC | |
by jethro (Monsignor) on Nov 09, 2004 at 01:56 UTC | |
Re: function chdir in Module Cwd broken?
by borisz (Canon) on Nov 09, 2004 at 13:51 UTC |