I have a large directory tree that I'd like to build index files for, essentially an
ls > index.txt in each directory in the tree. Obviously I'm having trouble figuring it out. =) I've tried the following: use File::Find; sub process_file { if (-d) { $tmp = `ls $_`; open(OFILE, "> index.txt") || die ("Couldn't open index.txt: $!\n"); print OFILE $tmp; close(OFILE); } } find(\&process_file, @ARGV); print "\n"; But it misses the deepest level of directories. Is there an established way of doing this kind of thing? TIA. - B -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]