Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: listing all subdirectories of directory into file

by NetWallah (Abbot)
on May 26, 2012 at 04:55 UTC ( #972568=note: print w/ replies, xml ) Need Help??


in reply to Re^2: listing all subdirectories of directory into file
in thread listing all subdirectories of directory into file

I would agree that File::Find is more useful, more powerful, and more productive.

However, it has some requirements/expectations of the user. It requires the user to understand callbacks, depth-first vs. width first, How to get the current directory name - all of which you can get if you RTFM, but IMHO, it is conceptually fairly difficult to ingest, for a newbie. That was my reasoning behind recommending 'opendir'. Also, once someone has gone through that pain, it is easier to appreciate a fine module like FF and FF:Rule.

             I hope life isn't a big joke, because I don't get it.
                   -SNL


Comment on Re^3: listing all subdirectories of directory into file
Re^4: listing all subdirectories of directory into file
by sauoq (Abbot) on May 26, 2012 at 06:38 UTC
    It requires the user to understand callbacks, depth-first vs. width first, How to get the current directory name

    Ah, but if you are going to roll it by hand, you should probably understand depth vs. breadth first searching. And certainly how to get the current directory name. You might also want to know a thing or two about symlinks and symlink loops, and think out your error handling. And, really, if you are going to do all that, there's a good chance you understand callbacks already. (BTW, I don't know how much you really need to understand about callbacks to follow an example and use one; not that I advocate using something that you don't understand... but you gotta learn somehow.)

    -sauoq
    "My two cents aren't worth a dime.";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2014-12-18 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (58 votes), past polls