find( \&search, $dir ); print " $_\n" for @files; if($createlog == 1){ my $log = "$logname"; open(INFO, ">$log"); print INFO " $_\n" for @files; close (INFO); if(-e $log){ print "\nDateipfade gespeichert in $logname\n"; } sub search{ my $file = $File::Find::name; my @a = stat($file); my $laTag = $a[8] / 60 / 60 / 24; my $now = time; my $nowTag = $now / 60 / 60 / 24; my $diff = $nowTag - $laTag; if (-f $file){ $countall++; if( $diff > $age ){ push @files, $file; $count++; } } }