in reply to How to delete non-empty directory

I've been using a script that a monk posted here sometime ago. It's an elaboration of swampyankee's idea:

my $old_dir = '/path/to/old_dir'; my $result = system("rm -rf $old_dir"); print "Result: $result\n";

It will delete directories with or without files.