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

3 lines
78 B
Perl
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
use IO::Dir;
sub dir_is_empty { !grep !/^\.{1,2}\z/, IO::Dir->new(@_)->read }