[tpm] Anomalous globular behaviour?

arocker at vex.net arocker at vex.net
Fri Apr 24 09:03:22 PDT 2009


I've just run across what seems to be an anomalous behaviour of glob.

If glob is looking for a wildcarded string, e.g. glob "findit*", if findit
is present, the value returned will be "findit". If it is not present,
null is returned.

Without the wildcard, i.e. glob "findit" the string "findit" will be
returned, whether or not there is a file by that name.

To summarise:
Literal Matching file?  glob returns   shell behaviour (e.g. ls -l)

f3           Yes                f3     f3 directory information
f3*          Yes                f3     f3 directory information

f4           No                 f4     cannot access f4
f4*          No                null    cannot access f4*

This seems wrong to me, and the Camel doesn't refer to the behaviour. Has
anybody an explanation?



More information about the toronto-pm mailing list