in reply to Find directories lt 7 days old
I try to be up-to-date:
#!/usr/bin/env perl use strict; use warnings; use Path::Iterator::Rule; use feature qw(say); my $amount = ( time - ( 60 * 60 * 24 * 7 ) ); my $rule = Path::Iterator::Rule->new; $rule->mtime(">$amount"); $rule->directory; my @dirs = qw(.); my $next = $rule->iter(@dirs); while ( defined( my $dir = $next->() ) ) { say $dir; } __END__
Please see Why not recommend IO::All? as well as IO::All and Path::Iterator::Rule for further information.
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|