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

lines :$nl-in question

Thread Next
ToddAndMargo via perl6-users
August 29, 2020 01:18
lines :$nl-in question
Message ID:
Hi All,

In the following:

    (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, 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,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About