i'm afraid you didn't read the docs very closely...

Returns the contents of a directory as a lazy list of IO::Path objects


stringifying an IO::Path object gives you a large string.

the examples in the docs take up more room than the description of the
routine. here's the first:

Examples:
> # To iterate over the contents of the current directory:
> for dir() -> $file {
>     say $file;
> }


i suspect iterating over the contents of the object returned by the dir
routine, as documented in the link you provided, will produce the expected
results.

~particle

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

> Hi All,
>
> 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.
>
>
> Many thanks,
> -T
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

Reply via email to