October 5th, 2012, 11:00 AM
Remove_tree deletes content but not directory
I am having trouble with remove_tree. While it deletes the contents of the directory, it does not delete the directory itself. I even explicitly set keep_root to 0.
Is there some trick to this?
There are 10 kinds of people in the world. Those that understand binary and those that don't.
October 5th, 2012, 03:07 PM
Use the keys(error => \$err and result => \$res) to see what it is removing and to see if any errors occur(http://search.cpan.org/~dland/File-Path-2.08/Path.pm ).
If you can not determine what is going on you can use the system command to run rm:
system( "rm -rf /tmp/$number" )