in reply to Re: Delete old files
in thread Delete old files
... 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"; } } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Delete old files
by Corion (Patriarch) on Mar 17, 2014 at 19:30 UTC | |
by Anonymous Monk on Mar 17, 2014 at 19:56 UTC | |
by roboticus (Chancellor) on Mar 18, 2014 at 11:42 UTC |