Harry Putnam wrote: > Is there a simple test to determine if a directory is empty or not? > > Or do you have to opendir, readdir, or something similar with a full > block. > >
That depends on what you mean by empty. On Linux, even empty directories have . and .. Why do you want to test for this? If all you want to do is remove directories, use rmtree() from File::Path. It will remove the directory, all its files and sub-directories. -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. Eliminate software piracy: use only FLOSS. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/