This won't work, because glob called in scalar context wants to iterate through all the files in a directory, and won't even look at its argument until it finishes. It will remember what directory it was reading on a previous call to is_empty. You could call glob in list context like this:
! (() = glob $_[0] . '/*');In reply to Re: Re: How do I determine whether a folder is empty?
by no_slogan
in thread How do I determine whether a folder is empty?
by joggi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |