use File::Find; my $count = 0; find sub { $count++ if -f and -s and not -l; }, "/top/level"; print "$count\n";