The dir function takes the directory to traverse, and optionally a named parameter test, which is smart-matchedarrow-up-right against the basename of each file (so for example we can use a regex):
dir
test
.say for dir ".", :test(/foo/);
Last updated 2 years ago