On Thu, May 10, 2018 at 7:34 PM, ToddAndMargo <toddandma...@zoho.com> wrote:

> https://docs.perl6.org/routine/dir
> perl6 -e 'my $x=dir; say "$x";'
> Does indeed read the directory, but give me one YUGE string.
> I need each entry to have some kind of a separator.

I'd say you did that to yourself, by wrapping it in quotes thereby forcing
it to turn into a simple single string. $x itself is a Seq of IO::Path

It will be easier to track this if you capture into an array (@x instead of
$x) and iterate over the contents. Or iterate directly:

pyanfar Z$ 6 'for dir() -> $x { say "$x" }'

I'm quoting $x there for the same reason, to turn the IO::Path into a Str.
Although arguably the correct way to do that is $x.Str instead of "$x".

brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to