in reply to Re: Re: Test for file(s): glob or -e?
in thread Test for file(s): glob or -e?

By design, glob only checks for actual existence of files if you include * or ? in that part of the path:
$ echo hi there>foo $ ls foo $ perl -wle'print for glob "{a,b,c,}fo{*,}"' afo bfo cfo foo fo
This pattern expands to {afo,bfo,cfo,fo,afo*,bfo*,cfo*,fo*}. Only the subpatterns containing a ? or * will be restricted to what exists. In the simple case, glob "joe.txt" will always return joe.txt.