> I tested your code on a directory which contains 29765 files in 2877 > directories and it only took 13 seconds. (I had to fill in use > File::Basename, $delimiter = '/', and the initial call to check_folders(), > of course.) > > Perhaps your file system is just very slow? > > Ronald
apparently pretty slow yes, (mac osX), although that code was part of a much larger program when i timed it. i tried again just running the code relevant for this thread and found out that your solution was after all pretty much faster (almost twice as fast sometimes). allan