Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: how to know if a path exists or not

by kennethk (Abbot)
on Oct 11, 2012 at 15:13 UTC ( #998474=note: print w/ replies, xml ) Need Help??


in reply to how to know if a path exists or not

File test operations are cataloged in -X. In particular, -e will tell you if something exists at that path, and -f and -d will test if a given string corresponds to a file and a directory respectively.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: how to know if a path exists or not
Select or Download Code
Replies are listed 'Best First'.
Re^2: how to know if a path exists or not
by Anonymous Monk on Oct 11, 2012 at 15:17 UTC

    I would try to open the path and see if it exists or not

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2015-07-30 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls