I was trying to be clever, so I discovered IO::Dir and seekdir
I wrote this code, and then had a WTF moment
sub dirEmpty { my $d = IO::Dir->new( @_ ); return defined( $d && $d->seek( 2 ) && scalar $d->read ); }
seekdir is broken on my win32 machine :)
In reply to Re^2: How to tell if a Directory is Empty
by Anonymous Monk
in thread How to tell if a Directory is Empty
by ishootperls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |