# do nothing if the directory is not empty return if glob("$directory/*");
glob skips filenames beginning with a dot, try return if glob("$directory/{*,.*}");
Update: Actually, upon re-reading the question I think I misunderstood what you are trying to do. Update 2: Yep, see my other reply for the solution.
In reply to Re: Strange behaviour when using glob in if condition
by haukex
in thread Strange behaviour when using glob in if condition
by yulivee07
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |