Empty directory: Difference between revisions

→‎Thorough version: oops. sorry. TimToady++
(→‎Thorough version: Indirect object call is bad, recommend ->new instead.)
(→‎Thorough version: oops. sorry. TimToady++)
Line 296:
===Thorough version===
<lang perl>use IO::Dir;
sub dir_is_empty { !grep !/^.{1,2}$/, IO::Dir->new(@_)->new->read }</lang>
 
=={{header|Perl 6}}==
Anonymous user