[comp.lang.perl] filename glob

chuck@ksr.UUCP (Chuck Shavit) (03/16/90)

I find the syntax of filename globbing rather odd.  If I am not
mistaken, this is the only case where $VAR and ${VAR} have different
semantics (except, of course, in strings like "${VAR}xx").  I bet that
if you are not familiar with the internals, you will not be able to
predict what the literal string will do in

    while ( <"*.c"> ) {...}


My suggestion is to modify the syntax.  One way is to replace perl's
filename glob syntax with a function call, e.g.

    for (glob("*.c")) {...}
    
Another possibility is to modify the globbing syntax to <<$var>>, where
$var is anything that evaluates to a string.
    

Chuck Shavit