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

Re: Recursive Subdirectories

by !unlike (Beadle)
on Apr 16, 2003 at 16:50 UTC ( [id://250967]=note: print w/replies, xml ) Need Help??


in reply to Recursive Subdirectories

You need to seperate your searching code off into a subroutine. Something like this might work:

parse_dir('.'); sub parse_dir { my $path = shift; opendir(HERE, $path) or die "$!\n"; while(readdir(HERE)) { next if /^\.(\.)[0,1]$/; parse_dir($_) if -d $_; #parse files here }

I'm sure others will offer a better solution.

!unlike

I write my Perl code like how I like my sex: fast and dirty. ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-04-19 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found