in reply to How to delete non-empty directory
It works, the only downside is that if you want to catch any errors, you need to trap $SIG{__WARN__} - annoying, to say the least.