>>>>> "Yue" == Yue Chen <[email protected]> writes:
Yue> I know I can use environment variable '$ENV{PWD}' to get unresolved
Yue> value but it is unreliable because this environment variable might
Yue> already be changed by the parent process spawning perl. I wonder is
Yue> there any kind of official way to do this job?
What if there are 100 different "unresolved" paths? Which one do you
want?
mkdir foo
for i in bar{a,b,c,d,e,f,g}{h,i,j,k,l,m,n}{o,p}; do ln -s foo $i; done
do you want baraho, or barclp, or barfho or ...?
And I'm not asking this to be pedantic. I'm asking so that you think
about what you're actually asking for.
If you want to know "how did the user get there", you'll need to have
a trail of what they did some how, which may not be available.
If you just want to know "where am I", then please accept the "resolved" name
as your current location.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/