--- name: File::Glob runtime: pp source: src/native/File/Glob/pp.rs --- ```{index} single: File::Glob; Perl module (pp runtime) ``` # File::Glob Native implementation of File::Glob Provides BSD glob pattern matching via libc's `glob()`. # Functions ## bsd_glob Expand a glob pattern into matching filenames using BSD-style semantics. Accepts an optional flags argument to control matching behavior. ```perl use File::Glob ':bsd_glob'; my @files = bsd_glob("*.pl"); my @files = bsd_glob("~/src/*.rs", GLOB_TILDE | GLOB_BRACE); ``` ## csh_glob Expand a glob pattern using csh-style defaults (GLOB_BRACE | GLOB_NOMAGIC | GLOB_QUOTE | GLOB_TILDE | GLOB_ALPHASORT). This is the function called internally by Perl's `<*.pl>` glob operator. ```perl use File::Glob ':glob'; my @files = csh_glob("*.{pl,pm}"); ``` ## GLOB_ERROR Return the error code from the most recent bsd_glob or csh_glob call. Returns 0 if the last call succeeded. ```perl use File::Glob ':bsd_glob'; my @f = bsd_glob("/no/such/*"); warn "glob error" if GLOB_ERROR; ``` Perl equivalent: File::Glob (core module, XS-based)