What am I missing and/or is there a better way to do this? Again, all I need to know is if the directory is empty or not without deleting anything.$start = time(); chdir "c:/temp"; while (<*>) { $num++; last if ($num==1); # makes no difference in speed } $stop = time(); $elapsed=$stop-$start; print "elapsed = $elapsed seconds\n";
In reply to Quickly checking if a directory is empty by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |