See File::Find on $File::Find::prune. I think in your situation, you want to do something like:
... if( $File::Find::name eq '/data/logs/master' ) { $File::Find::prune = 1; # stop searching through this } elsif( -f $File::Find::name && $File::Find::name =~ /auth.log$/ +) { save_file($File::Find::name) } else { # ignore the file } ...
In reply to Re: in Perl find call looking to exclude folder and ignore duplicate finds.
by Corion
in thread in Perl find call looking to exclude folder and ignore duplicate finds.
by ss_ham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |