Skip to content

Commit

Permalink
Add a section about case insensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed May 26, 2021
1 parent 5aef18a commit be5f291
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pod/perlfunc.pod
Expand Up @@ -3390,6 +3390,13 @@ use C<glob> instead as it is more readable and searchable.

my @txt_files = <"*.txt">;

If you need case insensitive file globbing that can be achieved using the
C<:nocase> parameter of the L<File:::Glob> module.

use File::Glob qw(:globally :nocase);

my @txt = glob("readme*"); # README readme.txt Readme.md

Note that L<C<glob>|/glob EXPR> splits its arguments on whitespace and
treats
each segment as separate pattern. As such, C<glob("*.c *.h")>
Expand Down

0 comments on commit be5f291

Please sign in to comment.