in reply to Re: in Perl find call looking to exclude folder and ignore duplicate finds.
in thread in Perl find call looking to exclude folder and ignore duplicate finds.
my $processed_files = 0; find({ wanted => sub { 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.l +og$/ ) { save_file($File::Find::name) } else { # ignore the file } follow => 1 }, @ARGV );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: in Perl find call looking to exclude folder and ignore duplicate finds.
by Tux (Canon) on Apr 19, 2023 at 10:30 UTC | |
|
Re^3: in Perl find call looking to exclude folder and ignore duplicate finds.
by Corion (Patriarch) on Apr 19, 2023 at 10:42 UTC |