in reply to Re^2: cleaning up old libs and @INC
in thread cleaning up old libs and @INC

A "couple of times"??
I felt particularly lazy there. Writing even a perl one-liner would have required more effort and documentation reading than it's worth. Running rmdir each time prunes the most nested empty dir, and I knew they would not nest deeper than 5 or 6. Much quicker.
Oh, and rmdir will not delete a directory if it's not empty.
I knew that. That was the point of using it.