BAD CODE ABOVE
t0mas, please don't write a recursing routine for directory walking. You broke it in the normal way people broke it. You don't check for symlinks. Now it can run forever if the symlinks point "above".
Be smart. Don't be a cargo-cultist. Use File::Find for recursion.