in reply to Re: Re: current directory
in thread current directory

1. That you are using an operating system that populates $ENV{PWD} with the correct answer.
2. That you haven't executed a chdir anywhere in your code.
You forgot:
3. You aren't being lied to by the caller.
since any program that trusts an env variable is a likely target for a security break-in.

-- Randal L. Schwartz, Perl hacker