Melis Mutlu wrote:
Hi,
Hello,
My problem is with File::Find module. I do not exactly
understand how it works. On the website it says that
for the given directory it does a depth first search
for each directory and file.
so when i do this:
find(sub{ return if -d; print "file"},
"/example_dir");
it should print as many "file" as I have in
/example_dir. Am I right?
Almost :),
The problems are:
1) you are return()ing before you get to the print statement :)
2) you are only testing for directories so if it was setup properly
return $file if -d $file; it would only return a list of directories
not a list of all the files
HTH
Lee.M - JupiterHost.Net
Thanks,
Melis
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>