use v5.20; use warnings; use File::Find; use File::stat; ... find(sub{ my $stat= stat $_ or die "stat($_): $!"; say "unlink $_" if time - $stat->mtime > 30*60; }, $folder);
When you are really sure it unlinks the right files, replace say "unlink $_" with unlink $_.
In reply to Re: unlink files
by NERDVANA
in thread unlink files
by frank1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |