in reply to File::Find managing the %options versus \&wanted dichotomy
#!/usr/bin/perl use Time::Local; use strict; use vars qw ( @times ); use warnings; my @trees = ( '/home/ftp/pub', $ENV{ AC_SYSTEM }, $ENV{ AC_WORKDIR } ); local @times = ( timelocal(0,0,15,14,7,105), timelocal(0,0,18,16,7,105 +) ); for ( @trees ) { MyFind( $_ ); } sub MyFind { for my $file ( grep !/^\./, glob ( shift() . '/*' ) ) { if ( -d $file ) { ( -x $file ) and MyFind( $file ); } else { my @stat = stat $file; ( $stat[9] > $times[0] ) and ( $stat[9] < $times[1] ) and print "$file\n"; } } }
One world, one people
|
|---|