if (-f $_) { if (-s _ == 0) { print $File::Find::name, "\n"; } } #### my %usage; sub wanted { if (-f $_) { my $size = -s _; $usage{$File::Find::dir} += $size; if ($size == 0) { print $File::Find::name, "\n"; } } } sub postprocess { print "Usage of $File::Find::dir is $usage{$File::Find::dir}\n"; } find({wanted => \&wanted, postprocess => \&postprocess}, ...);