in reply to How can I make File::Find skip over dirs to which I don't have permission?

Did you try -r -x ?

  • Comment on Re: How can I make File::Find skip over dirs to which I don't have permission?

Replies are listed 'Best First'.
RE: Answer: How can I make File::Find skip over dirs to which I don't have permission?
by 23skiddoo (Beadle) on Aug 31, 2000 at 02:27 UTC
    OK, I'm getting the hang of this format--I guess instead of a preview per se, I have a lag time for editing....

    Anyway, in regards to using -r -x (or other tests), that will keep me from churning them through the subroutine, like so:

    find ( \&procfile, @DIRS ); sub procfile { return if ! -r -x; # do something to everything else here }
    But I am wondering how to keep Find::File from attempting to enter unpermitted subdirectories before they get processed by the subroutine.

    Prost!

RE: Answer: How can I make File::Find skip over dirs to which I don't have permission?
by 23skiddoo (Beadle) on Aug 31, 2000 at 02:18 UTC
    > (My apologies if I've munged the HTML. I'm new to Perl Monks and wish there were a preview option for submissions a la slashdot.) OK, I just RTFM. I see now. (I like to dive right in... :) ) Prost!