$i=0; opendir(DIR, "$someDir") or die "Cant open $someDir: $!\n"; @files = readdir(DIR); foreach $file(@files) { unless ($file =~ /^[.][.]?\z/) { $i++; } } if ($i != 0) { print "There is Stuff in here!"; } else { print "This Dir is Empty!"; } closedir(DIR);