Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how to get the all the subdirectories path from the directory

by rinceWind (Monsignor)
on Mar 09, 2006 at 08:45 UTC ( #535349=note: print w/replies, xml ) Need Help??


in reply to how to get the all the subdirectories path from the directory

If you are looking at alternatives, you might like to try my File::Wildcard, which gives you an object that you repeatedly call $obj->next on, which returns each file name in turn.

You have control of the sort order of each directory, the ellipsis ordering, i.e. whether you want to see subdirectories first or afterwards, and you can use a regex to filter the list and give you just the files that you want. You can even use $1, $2, etc. captures in the regex to construct a array of new filenames.

Enjoy

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

  • Comment on Re: how to get the all the subdirectories path from the directory

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://535349]
help
Chatterbox?
[Discipulus]: wow i have a good 19.35 in 2017
[choroba]: I had 24.5 in January, but the last three month are below 18.5
[choroba]: and I'm trying hard not to get involved in troll feeding.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2017-04-26 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (474 votes). Check out past polls.