sub dirEmpty { return !! eval { opendir my($d), @_ or die $!; my $file ; $file = readdir $d for 1..3; defined $file; }; }