Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!samsung!rex!ames!amdcad!sun!joe.Eng.Sun.COM!petolino From: petolino@joe.Eng.Sun.COM (Joe Petolino) Newsgroups: comp.lang.perl Subject: How to find working directory? Message-ID: <139945@sun.Eng.Sun.COM> Date: 1 Aug 90 01:20:07 GMT Sender: news@sun.Eng.Sun.COM Lines: 11 I'm a fairly new perl user, so excuse me if this is a dumb question. I know I can change my working directory with chdir(). Is there a symmetrical operation which tells me what my working directory is (short of invoking pwd in a subshell, that is)? Imagine my surprise when I found out that chdir() doesn't set $ENV{'PWD'} ! Do I really have to test each chdir() for success and then conditionally assign its argument to $ENV{'PWD'} ? The programs I'm invoking after the chdir() expect $PWD to be accurate. -Joe