|
|
| more useful options | |
| PerlMonks |
Re: Can't remove directory-Permission deniedby Lotus1 (Hermit) |
| on Oct 22, 2012 at 17:11 UTC ( #1000386=note: print w/ replies, xml ) | Need Help?? |
|
After you fix the problem with attempting to remove the directory '.' the next likely problem with this code is the file test -d.
$dir is a directory so this will return true even when $_ is a file. Try the following instead of if(-d $dir): return unless -d;This will test $_.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||