Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Directory Tree Structure

by marto (Cardinal)
on Oct 21, 2005 at 10:42 UTC ( [id://501951]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Directory Tree Structure
in thread Directory Tree Structure

Hi rupesh,

"Each subdirectory's subdirectories (confusing, but doable)
..recuresively (uh..uh)"

Are you having difficulty doing this recursively?
As a little example look at this code below:
#!/usr/bin/perl use strict; use warnings; use File::Find; my $TargetPath = $ARGV[0]; find (\&ProcessTree,$TargetPath); sub ProcessTree { print "Directory: $File::Find::name\n" if -d; print "File: $File::Find::name\n" unless -d; }

Call this script with the path you want to traverse as an argument.
Are you planning on using the HTML::Template module?
I hope the above example has given you an idea of how to tackle this.
Let me know how you get on.

Martin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-24 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found