use strict; use warnings; use 5.010; use File::Find qw/find/; my @all; my @insub; my @outsub; my $dir = 'static'; find sub { my $f = $File::Find::name; push @all, $f; return if -d $f; push @insub, $f; }, $dir; @outsub = grep {!-d} @all; my $all_count = @all; my $insub_count = @insub; my $outsub_count = @outsub; say 'all_count = ', $all_count; say 'insub_count = ', $insub_count; say 'outsub_count = ', $outsub_count; #### all_count = 436 insub_count = 436 outsub_count = 408 #### return if ! -d $f