Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: pwd? Message-ID: <129476@uunet.UU.NET> Date: 18 Apr 91 20:41:32 GMT References: <6330@male.EBay.Sun.COM> <1991Apr17.165554.16507@iwarp.intel.com> Organization: UUNET Communications Services, Falls Church, VA Lines: 13 merlyn@iwarp.intel.com (Randal L. Schwartz) writes: >Unless you're willing to stat a lot of directories, the fastest way is: > > chop($path = `cd $name && pwd`); I have never seen a shell that treated cd properly with respect to && and ||. Try "cd /bogon || echo failed". However, the example you give does leave $path with nothing, so perhaps it "works" after all. -- [rbj@uunet 1] stty sane unknown mode: sane