I'm having a bit of trouble with one of my scripts that lists a directory recursively for my webpage. What I want to do is be able to limit the recursion depth, but so far, I've only gotten it to limit directories that it sees fit to. It's a very picky script apparently.
Recursion depth of 0 works as it should, recursing infinitely (or, at least as far as it can). Depth of 1 works, too, working like `ls` does. However, after that..well.. it decides what depth it likes. Here's the code, and here's an example. Sorry for not using File::Find, I know I got criticized for that before. Any help welcomed :o)