in reply to How do I find what directory the perl script is running from?

No. There are partial answers based on examining $0 and $ENV{PATH}, with algorithms rolled up into File::FindBin, but nothing will ever be completely unspoofable or accurate.
  • Comment on Re: How do I find what dir the perl script is running from?

Replies are listed 'Best First'.
(tye)Re: Answer: How do I find what dir the perl script is running from?
by tye (Sage) on Dec 19, 2000 at 01:58 UTC

    See FindBin is broken (RE: How do I get the full path to the script executing?) for why this is completely wrong. (:

    Update: Just FYI, I interpret the original question as wanting to know about getcwd() and use Cwd, rather than wanting the full path to the script (which is what File::FindBin tries to find in a very perverse way). But it is hard to say for sure.

            - tye (but my friends call me "Tye")