Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: search for a file

by japhy (Canon)
on Jun 08, 2006 at 12:37 UTC ( [id://554266]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://554266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found