in reply to Yet another problem with recursive code

To elaborate a bit on what Fastolfe wrote: when you write recursive functions you need to have stop conditions (which may have, um, a more technical name :). But the point is, you need to stop at some point! Think about it from a logical perspective: do you want your program to run forever? If you were recursing through a dir. structure by hand, where would *you* stop? When you could no longer find any sub-directories, right?

Sorry if that seems incredibly basic etc.; in your case you could've just forgotten to write a stop condition. But I can't know that, can I.

That said, use File::Find. :)

  • Comment on Re: Yet another problem with recursive code