in reply to Re: Empty directory
in thread Empty directory
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; }
|
|---|