This works for me:
use strict; use warnings; use File::Find::Rule; my @dirs = File::Find::Rule ->directory ->mtime( '>' . (time - (60 * 60 * 24 * 7)) ) ->in( '.' ) ; print "$_\n" for @dirs;
The tricky part is what to pass to mtime() ... you need to subtract 7 days from the current Epoch (via time) and anything greater than that result falls within the past 7 days. You will need to install File::Find::Rule.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Find directories lt 7 days old
by jeffa
in thread Find directories lt 7 days old
by Jeri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |