Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Find directories lt 7 days old

by karlgoethebier (Abbot)
on Apr 01, 2015 at 19:27 UTC ( [id://1122191]=note: print w/replies, xml ) Need Help??


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»

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1122191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found