In list context, returns a (possibly empty) list of filename expansions on
the value of EXPR such as the standard Unix shell /bin/csh would do. In
scalar context, glob iterates through such filename expansions, returning
undef when the list is exhausted. This is the internal function
operator, but you can use it directly. If
EXPR is omitted,
is used. The
operator is discussed in
more detail in "I/O Operators" in perlop.
glob will split its arguments on whitespace, treating
each segment as separate pattern. As such,
match all files with a .c or .h extension. The expression
would match all files in the current working directory.
Beginning with v5.6.0, this operator is implemented using the standard
extension. See File::Glob for details, including
which does not treat whitespace as a pattern separator.