Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Empty Folders

by smokemachine (Hermit)
on Jun 03, 2008 at 17:19 UTC ( [id://689952] : note . print w/replies, xml ) Need Help??


in reply to Empty Folders

perl -e 'sub emptyFolders{my$dir=shift; $dir .="/" if $dir; my@dirs; w +hile(<$dir*>){next unless -d; push @dirs, $_ if scalar (my@a=<$_/*>)} +return @dirs} print $_, $/ for emptyFolders'