79445362

Date: 2025-02-17 12:19:33
Score: 1
Natty:
Report link

The [File::Globstar](https://metacpan.org/pod/File::Globstar] module does this sort of thing. The ** can cross directories:

use File::Globstar qw(globstar);
my @files = globstar '/abc/def/**/myfile.txt';

But, I might be tempted to check the performance against letting the shell do it for me:

my @files = `ls /abc/def/**/myfile.txt`;

See also What does the double-asterisk (**) wildcard mean?

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-2):
Posted by: brian d foy