use Path::Iterator::Rule; my $rule = Path::Iterator::Rule->new; # match anything $rule->file->size(">10k"); # add/chain rules # iterator interface my $next = $rule->iter( @dirs ); while ( defined( my $file = $next->() ) ) { ... } # list interface for my $file ( $rule->all( @dirs ) ) { ... } #### $rule->contents_match(qr/BEGIN .* END/xs); $rule->line_match(qr/^new/i, qr/^Addition/);