develooper Front page | perl.perl6.users | Postings from August 2020

lines :$nl-in question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
August 29, 2020 01:18
Subject:
lines :$nl-in question
Message ID:
8a7d36a1-69a0-00e2-9fae-182b6e23825c@zoho.com
Hi All,

In the following:

    https://docs.raku.org/type/IO::Path#method_lines

    (IO::Path) method lines

    Defined as:

    method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = 
["\x0A", "\r\n"], |c --> Seq:D)

    Opens the invocant and returns its lines.

    The behavior is equivalent to opening the file specified
    by the invocant, forwarding the :$chomp, :$enc,
    and :$nl-in arguments to IO::Handle.open, then calling
    IO::Handle.lines on that handle, forwarding any of the
    remaining arguments to that method, and returning the
    resultant Seq.

What exactly is and how exactly do you use `:$nl-in`

And if I am not pushing it, what is `|c`?

I am confused,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About