Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: A looping question

by Erez (Priest)
on Sep 10, 2010 at 20:06 UTC ( #859686=note: print w/replies, xml ) Need Help??


in reply to Re^3: A looping question
in thread A looping question

I see what you mean. File::Find isn't about "finding files", but is a tool for recoursing through a directory tree, and performing an action on some/all of the files/directories.

To check for the existence of a file/directory you can use the file tests that come with perl itself (http://perldoc.perl.org/functions/-X.html). for example if you have a $path, -e $path will return whether the path exists, -d $path will return true if the path is of a directory, and -f $path will return true if the path is of a file

"Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://859686]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-12-02 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (49 votes). Check out past polls.