in reply to File::find preprocess problem
I don't have a directory tree to test on, but I think you are using preprocess in the wrong manner by returning a set of files. Preprocess should work by returning empty, unless some condition is met. Some pseudocode: ( my logic is probably not syntactically correct, but it shows the idea) :-)
sub preprocess{ if( $File::Find::dir =~ m/advanced/ ){ return $File::Find::prune = 1 } return unless -f $File::Find::name; return unless $File::Find::name =~ m/\.log/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File::find preprocess problem
by Marshall (Canon) on Apr 26, 2012 at 21:08 UTC | |
by zentara (Cardinal) on Apr 27, 2012 at 10:05 UTC | |
by Marshall (Canon) on Apr 27, 2012 at 11:51 UTC | |
by Anonymous Monk on Apr 27, 2012 at 14:16 UTC | |
by zentara (Cardinal) on Apr 27, 2012 at 14:48 UTC | |
by Anonymous Monk on Apr 28, 2012 at 03:07 UTC | |
by Anonymous Monk on Apr 28, 2012 at 04:07 UTC |