9.6.3. Discussion
In versions of Perl before v5.6, Perl's built-in
glob and <WILDCARD>
notation (not to be confused with
<FILEHANDLE>) ran an external program (often
the csh shell) to get the list of filenames.
This led to globbing being tarred with security and performance
concerns. As of v5.6, Perl uses the File::Glob module to glob files,
which solves the security and performance problems of the old
implementation. Globs have C shell semantics on non-Unix systems to
encourage portability. In particular, glob syntax isn't regular
expression syntax—glob uses
? to mean "any single character" and
* to mean "zero or more characters," so
glob("f?o*") matches flo and
flood but not fo.
For complex rules about which filenames you want, roll your own
selection mechanism using readdir and regular
expressions.