in reply to Re: How to tell if a Directory is Empty
in thread How to tell if a Directory is Empty
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 :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to tell if a Directory is Empty
by Anonymous Monk on Nov 27, 2011 at 10:05 UTC | |
by MarxBro (Initiate) on Feb 20, 2012 at 23:05 UTC | |
by afoken (Chancellor) on Feb 22, 2012 at 18:52 UTC | |
by MarxBro (Initiate) on Feb 27, 2012 at 05:42 UTC |