RosettaCodeData/Task/Empty-directory/Perl/empty-directory-2.pl

3 lines
78 B
Perl
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
use IO::Dir;
sub dir_is_empty { !grep !/^\.{1,2}\z/, IO::Dir->new(@_)->read }