in reply to Re: Re: Re: Re: Fileglob in scalar context question
in thread Fileglob in scalar context question

So if just feeding it a user-supplied filename, which may or may not contain wildcards, you don't want non-existing files to just disappear from the list. But with wildcards, no matches is no matches! Seems inconsistant. That is, I don't know why you would want
@ARGV= map glob, @list;
to work the way you say, unless you are also assuming that non-wildcard names are output files. I suppose the shell works this way because the whole line is passed through glob, and it doesn't know which items are supposed to be filenames or not. So as a point of design for that purpose, any string with no globbing characters are passed through unchanged.

I can see the point about not reading a whole directory to see if one file exists. That's for OS's that don't have glob support on their directory listing primitive, I suppose.

—John