I am trying to use the File::Globstar module to search for files recursively. https://metacpan.org/pod/File::Globstar#EXAMPLES.
However, some of the patterns given in the documentation are not working for me when the path contains a . or a _.
For example, the search is empty when I do either of the following:
use File::Globstar qw(globstar);
my $path = 'D:/a.a/b/c/**/*.js';
my @results = globstar $path;
or
use File::Globstar qw(globstar);
my $path = 'D:/a_a/b/c/**/*.js';
my @results = globstar $path;
However, these work when I avoid using **.
my @results = globstar 'D:/a.a/b/c/e/*.js'
Am I doing something wrong?
This appears to be a bug in File::Globstar.
[ Fixed in 0.6 ]
The bug isn't Windows-specific.
Attempts to escape the problematic characters proved fruitless on both systems.
You should reach out to the maintainer.
You could possibly use File::Find::Rule instead of File::Globstar.