in reply to search for a file

Perl does not look in your PATH environment variable for files. It looks in the current directory, unless you give it a FULL file path.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: search for a file
by dsheroh (Monsignor) on Jun 08, 2006 at 15:28 UTC
    That depends on what the meaning of "is" is. Erm, I mean...

    You can do -e '../foo/bar', which checks a file in a different directory, but I don't consider a relative path to be "a FULL file path" either. That's just semantics, I know, but it seemed like something worth clarifying in case the OP reads your comment the way I did.

    To the OP: It works like filename arguments (which ignore $PATH), not executable filenames (which search $PATH). ls foo only looks in the current directory, ls /bin/foo only looks in /bin, and ls ../bar/foo only looks in ../bar. -e works the same way.