![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Surprising behavior of Cwd module on Unix with symlinksby Anonyrnous Monk (Hermit) |
on Feb 08, 2011 at 12:26 UTC ( [id://886943]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|