[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] `pwd` Bug or Feature?



Richard Rathe <rrathe@dean.med.ufl.edu> writes:
>I use this line to get the current working directory:
>
>	$dir = `pwd`;
>
>There seems to be a difference if I'm working at the "root" level:
>
>	MacHD:		(root)
>	MacHD:folder	(up one level)
>
>Notice that the former has a ":" on the end and the latter does not.
>
>Is this the way it should be? I'm using MacPerl 5.1.3r2.

I don't know how it "should be", but it's not an accident that it's implemented
this way :-)

It is definitely necessary to have volume names terminate with a ":". It could
be argued that it would be better to have all directory names end with ":", so
the 2nd line would be the one to correct. However, I fear the consequences for
existing code.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "I'm set free to find a new illusion" -- Velvet Underground