Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Can't remove directory-Permission denied

by Lotus1 (Curate)
on Oct 22, 2012 at 17:11 UTC ( #1000386=note: print w/replies, xml ) Need Help??


in reply to Can't remove directory-Permission denied

After you fix the problem with attempting to remove the directory '.' the next likely problem with this code is the file test -d.

sub unwanted { if(-d $dir) { if ( ( -M $_ ) >2 &&(-M $_)<4)

$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 $_.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000386]
help
Chatterbox?
[Tanktalus]: maybe next week at the earliest. :P
[Tux]: Don't you ♥ Unicode :)
[Tanktalus]: Tux: usually, yes. :P

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-09-25 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (291 votes). Check out past polls.

    Notices?