nemesdani has asked for the wisdom of the Perl Monks concerning the following question:
find ({ preprocess => \&preprocess, wanted => \&wanted }, $mypath); sub preprocess { my @toreturn = (); if (-f && /\.log$/ ) {push (@toreturn, $_);} elsif (-d && /advanced/ ) {push (@toreturn, $_);} return @toreturn; } sub wanted { if ($File::Find::dir =~ /$envName$/) { checkLastLine(); } else {print "not same env: $File::Find::name\n";} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::find preprocess problem
by Anonymous Monk on Apr 25, 2012 at 10:55 UTC | |
|
Re: File::find preprocess problem
by zentara (Cardinal) on Apr 25, 2012 at 11:07 UTC | |
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 | |
| |
|
Re: File::find preprocess problem
by Anonymous Monk on Apr 25, 2012 at 10:56 UTC |