Non-recursively

The dir function takes the directory to traverse, and optionally a named parameter test, which is smart-matched against the basename of each file (so for example we can use a regex):

.say for dir ".", :test(/foo/);

Last updated