my $newfile = undef; finddepth( sub { if (-M $_ <= 30){ $newfile=$File::Find::name; goto done_finddepth; } }, $base ); done_finddepth: die "the new file is $newfile"; #### my $count = 0; &find( sub { $count++; File::Find::breakout() if $count == 500; }, '/');