Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Surprising behavior of Cwd module on Unix with symlinks

by Anonyrnous Monk (Hermit)
on Feb 08, 2011 at 12:26 UTC ( #886943=note: print w/ replies, xml ) Need Help??


in reply to Re: Surprising behavior of Cwd module on Unix with symlinks
in thread Surprising behavior of Cwd module on Unix with symlinks

FindBin correctly resolves it, giving us the full path to the directory.

As far as I understand, the OP wants the opposite, i.e. the respective symlink path being returned (/home/david/symlink in your case), not the target of the symlink, which is more generally aka realpath, and is easier to determine.

As ikegami pointed out, some other process (usually the shell) needs to keep track of the chdir history to be able to provide the info the OP wants.


Comment on Re^2: Surprising behavior of Cwd module on Unix with symlinks
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://886943]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-07-25 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls