Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by radiantmatrix (Parson)
on Mar 09, 2006 at 16:27 UTC ( #535428=note: print w/replies, xml ) Need Help??


in reply to Re: how to get the all the subdirectories path from the directory
in thread how to get the all the subdirectories path from the directory

I don't think those do what you think they do. Here are some options:

use File::Find; #print all entries at or below starting dir: find ( sub { print $File::Find::name,"\n" }, '.' ); #print all directories at or below starting dir: find ( sub { next unless -d; print $File::Find::name,"\n"; }, '.' ); #print all entries, trailing directories with a '/': find ( sub { print $File::Find::name,(-d $_ ? '/' : ''),"\n" },'.' );
<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet
  • Comment on Re^2: how to get the all the subdirectories path from the directory
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://535428]
help
Chatterbox?
[holli]: i don't know. meat and tomatoes don't belong anywhere near each other in my book
[holli]: unless the meat is in sausage form and the tomatoes being ketchup, that is
[Discipulus]: no ragł? i'm sorry..;=)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-11-22 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (316 votes). Check out past polls.

    Notices?