in reply to glob pattern matching

glob() *expands* wildcards, but if there's no wildcard it leaves them alone, in just the same way as the shell does:
$ echo $SHELL # yes, this is important! /bin/bash $ ls foo1 foo2 foo3 $ echo foo* foo1 foo2 foo3 $ echo foo foo
There's a difference however, if you specify a wildcard that doesn't match anything:
$ echo bar* bar* $ perl -e 'print glob("bar*")' $
This is because glob() uses csh semantics:
$ csh % ls foo1 foo2 foo3 % echo bar* echo: No match. % echo bar* echo: No match. % perl -e 'print glob("bar*")' %