in reply to Delete Files
for my $filename (@files) { my $filepath = "$dir$filename"; stat($filepath); if (-f _ and -M _ > $daysToPurge) { print LOGF "$filepath will be purged\n"; unlink $filepath or print ERRLOG "Can't remove $filepath: $!"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Delete Files
by windy (Initiate) on Feb 07, 2003 at 02:05 UTC |