Walk a directory/Non-recursively: Difference between revisions

→‎{{header|Perl 6}}: Death to parentheses! Also, improved the explanation above the code.
(→‎{{header|Perl 6}}: Death to parentheses! Also, improved the explanation above the code.)
Line 860:
 
=={{header|Perl 6}}==
The <code>dir</code> function takes the directory to traverse, and optionally a named parameter <code>test</code>, which canis [https://docs.perl6.org/routine/$TILDE$TILDE smart-matched] against the basename of each file (so for example bewe can use a regex):
<lang perl6>.say for dir( ".", :test(/foo/));</lang>
 
=={{header|Phix}}==
Anonymous user