... my @file_list; while (my $file = readdir DIR) { next if $file=~/^\./; push @file_list, $file; } closedir DIR; for my $files (@file_list) { my @stats = stat($files); if ($now-$stats[9] > $age) { # files older than 7 days print "$files\n"; } } ...
In reply to Re^2: Delete old files
by Anonymous Monk
in thread Delete old files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |