Perl-Sensitive Sunglasses | |
PerlMonks |
Getting logical path from Perl?by mathomp4 (Novice) |
on Mar 08, 2021 at 13:24 UTC ( [id://11129329]=perlquestion: print w/replies, xml ) | Need Help?? |
mathomp4 has asked for the wisdom of the Perl Monks concerning the following question: I am most definitely not a Perl guru, so I might be asking a simple question but...I can't figure it out. I work on a model that uses Perl for some scripting that creates other scripts. I also work on a system where directories can "move" because of NFS. As an example, I have a directory on the system: /discover/nobackup/mathomp4That is actually a path through a symlink:
Every so often, due to disk systems filling up, they might have to move us from, say, dnb44 to dnb45, and if I use Perl to make a script before that move, well, things break. So, it would be good for Perl to use the logical and not physical path. For example, I have a script that wants to know what directory it was called from. My hope after reading the FindBin docs:
was that Bin would do it, but it seems to be the same as RealBin:
Dang. So is there any way for Perl to see the logical path rather than the physical one?
Back to
Seekers of Perl Wisdom
|
|