I think File::Find is a module that you can use for this task..
if not you can do it the harder way, as
opendir(ROOT,'/web/web1/') or die "Can't open directory; @my_names = readdir(ROOT); # do a filetest(-d on each element of @my_names, # you can check directories thusly foreach my $elem(@my_names) { if(-d $elem) { # yup, its a directory } # push it onto a stack, for later processing else { # file, symlink.. so, check if its the file you <br>want to + process... and do stuff with it, or let it alone } }
So, have this stuff inside a subroutine.. first open the header directory, and pass a list of elements to the subroutine.. keep doing this recursively for each subdirectory you encounter..
HTH
Update: I see YoungPups has already recommended File::Find.. sound advice :o)
In reply to Re: Recurse through directories for file I/O
by tinman
in thread Recurse through directories for file I/O
by aconite
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |