#!/usr/bin/perl use File::Find; use Time::Local; use strict; use vars qw ( @times ); use warnings; my @trees = ( '/home/ftp/pub/', $ENV{ AC_SYSTEM }, $ENV{ AC_WORKDIR } ); # the two time limits between which files are to be searched local @times = ( timelocal(0,0,15,15,7,105), timelocal(0,0,18,16,7,105) ); find( \&wanted, @trees ); sub wanted { # $_ contains the filename without path /^\./ and return; # clue: it still cd's into these! my $got = $File::Find::name; ( -f $got ) or return; my @stat = stat($got) or return; ( $stat[9] > $times[0] ) or return; ( $stat[9] < $times[1] ) or return; print "$got\n"; # if it cleared all the checks print it }