Perl6 でディレクトリの中身を列挙する

for dir("/tmp/") { .Str.say }

でよい。

.Str が必要なのは、わたってくるのが IO::Path のインスタンスだからです。

Published: 2014-11-28(Fri) 08:09