The if(-f) prevents you from deleting anything but files. That means the directories are left alone. True, I should have a die, but it does work, and I use similar code regularly.unless(-f){ unlink $File::Find::name; }
In reply to Re: Re:x2 deleting windows subdirectories
by Steve_p
in thread deleting windows subdirectories
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |