in reply to current directory

You can also check this:

$ENV{PWD}

Update: If you:

use Cwd qw(chdir);

Your $ENV{PWD} will be kept up to date.

Replies are listed 'Best First'.
Re: Re: current directory
by ehdonhon (Curate) on Jul 22, 2002 at 14:38 UTC

    Yes, assuming:

    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.
      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

Re: Re: current directory
by Sara (Acolyte) on Jul 22, 2002 at 14:37 UTC
    thanks all