in reply to Re^8: Help with $File:Find
in thread Help with $File:Find
find( { wanted => \&get_files, preprocess => \&nodirs }, "$BASEDIR +/$dir" ); sub nodirs { grep !-d, @_; } sub get_files { return unless ( -f $_ ); my $tmpfile = $File::Find::name if ( ($_) && ( (/^(?!\.).*\.($ +INTYPES)$/i) || ( (/^(?!\.).*\.($INTYPES)\.($ENGZTYPES)$/i) && !(/\.( +$OUTTYPES)\.($ENGZTYPES)$/i) ) ) ); if ( $tmpfile ) { if ( ( exists( $globalfiles{$tmpfile} ) ) && ( ( $globalfi +les{$tmpfile} ne 'submitted' ) || ( $globalfiles{$tmpfile} ne 'workin +g' ) ) ) { return; } else { if ( -e $tmpfile ) { my $lckfile = getlckfile($tmpfile); push @tmparray, $tmpfile unless ( -e $lckfile ); } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Help with $File:Find
by Marshall (Canon) on Feb 22, 2018 at 21:18 UTC |