sub callback { my ($found) = @_; print $found->filename, "\n"; return 0 if $found->pathname =~ $end_condition; return 1 if $found->pathname =~ $skip_condition; process($found); return 1; }