Perl 5 version 8.0 documentation
- glob EXPR
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 implementing the
<*.c>operator, but you can use it directly. If EXPR is omitted,
$_is used. The
<*.c>operator is discussed in more detail in I/O Operators in perlop.
Beginning with v5.6.0, this operator is implemented using the standard
File::Globextension. See File::Glob for details.