You really should check the return status of the opendir and not let the script go any further if it fails.
How about:
sub numfiles { opendir D, shift or die "Ugh. $!\n"; grep !/^\.{1,2}$/, readdir D; }
In reply to RE: Re: Empty directory
by turnstep
in thread Empty directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |