in reply to Renaming Directories Recursively

I belive you need to tell it to process everything in the dir before it processes the dir itself. I *belive* this will force it to traverse to the end of the directory tree before it processes the lower level directories. To do this, call find with "bydepth => 1".
find ({wanted => \&rem_space, bytedepth => 1}, $dir);
That might do the trick.

Hope this helps..
Rich

Rich is yet again wishing for the "Monks composing nodes that are identical to yours" feature..