#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ path /; use File::Find::Rule qw/ find rule :Age /; path( q{goner/goner/goner/newy.txt} )->touchpath->spew(1234); path( q{goner/goner/goner/oldy.txt} )->touchpath->touch( time - 60*60*60 ); find( file => age => [ newer => '1D' ], exec => sub { print "#<1D# $_[2]\n"; return !!0; }, in => "goner", ); my $printer = sub { ## my( $shortname, $path, $fullname ) = @_; if(-M _ > 1 ){ print "#>1D# $_[2]\n"; } return !!0; ## means discard }; rule( file => size => '<6', exec => $printer, )->in( "goner" ); path( "goner" )->remove_tree; __END__ #<1D# goner/goner/goner/goner.txt #>1D# goner/goner/goner/oldy.txt