find ( \&procfile, @DIRS ); sub procfile { return if ! -r -x; # do something to everything else here }