use 5.012; use warnings; use File::Find; my @stuff; for (1..1000) { @stuff = (); find(sub { push @stuff, $_ if (/\.pod$/) }, @ARGV); } say scalar(@stuff);