in reply to Re: Re: File Find permissions check
in thread File Find permissions check

Pardon me in advance, fellow monks!
I know it's ugly and just a terrible hack... but, personally, if I have to get the job done and -r is not reliable, I wouldn't mind that much trying
if(!opendir(DIR,$startDir)){ # ... }else{ closedir(DIR); }

Finding, installing, testing a module for doing just that seems a bit of an overkill... just my 0.02euros, as usual.

Replies are listed 'Best First'.
Re: Re: Re: Re: File Find permissions check
by Anonymous Monk on Jul 07, 2003 at 15:02 UTC
    thanks it now works. Question about adding "exit" command. If I add it in the below area will it be a problem because I am exiting without doing the "closedir(DIR)" filehandle??
    PLease advise if this is okay??
    if(!opendir(DIR,$startDir)){ print "No permission to open directory $startDir\n"; exit 0; }else{ closedir(DIR); }