Ronen Kfir wrote: > Hi, > > This is not I was asking for! > I'll explain again: > 1. Find all the places where a one specific file (with same name), is shown by read > recursively all subdir of certain directory (it is a trigger file for the rest of my > program). What you wrote is only the top level of the directory. > 2. What I'm interested in are the paths of this file in the various directories. I > need to put each of those paths as a variable. (I think in array/hash). > 3. then I go to each path & from there pick up another file with same name from all > different paths, then my program will go on. > > To make a long story short: I need the readdir switch (or anything else) for digging > into subdir, & a way to put the paths I find in array/hash. > Am I clear enough now? > > P.S. > I work on Linux, > > > Ronen Kfir
Then get to work! Look, you are dictating first the method that must be used, and then demanding that we present you with some finished product to accomplish this. What have you tried? Where are you stuck? As some have pointed out, the File::Find module can do this job for you. See if the mocule is installed, and install it if not. Then do perldoc File::Find and use the information contained therein to solve your problem. Unfortunately, using the module does not teach you anything about how to construct a well-ordered recusive system. Is this what you are working on? Is this the focus of your homework assignment? If so, you will need to create a function which scans through a diretory seeking the file, and calls itself on all subdirectories. To do this effectively, you will have to be comfortable and skilled with passing values, both by value and by reference, to functions. How are your skills in this regard? Please show some of the work that you are doing to accomplish this task, and you will get more help. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]