[kw-pm] why is my $PWD uninitialized?

Robert P. J. Day rpjday at crashcourse.ca
Mon May 31 06:37:21 PDT 2010


On Mon, 31 May 2010, Christopher Calzonetti wrote:

> On Mon, May 31, 2010 at 09:02:03AM -0400, Robert P. J. Day wrote:
> >
> > $ sudo test/udev-test.pl
> > Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1735.
>
> shikamaru:~ elbie$ perl -e 'print "\"$ENV{PWD}\"", "\n";'
> "/Users/elbie"
> shikamaru:~ elbie$ sudo perl -e 'print "\"$ENV{PWD}\"", "\n";'
> ""
>
> Sudo by default calls a reset of the environment.  See the man page for
> more information.

  yes, that will explain it.  i'm embarrassed -- i really should have
known that, shouldn't i?

  i might write a short wiki page on this and let you folks play with
it if it interests you.  i think the source needs to be tweaked to get
around some obvious glitches.

  more later...

rday



-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


More information about the kw-pm mailing list