File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,28 @@ This returns a value that the operating system would understand as a "file descr
530
530
is suitable for passing to a native function that requires a file descriptor as an
531
531
argument such as C < fcntl > or C < ioctl > .
532
532
533
+ = head2 method .nl-in
534
+
535
+ Defined as:
536
+
537
+ method nl-in(--> Proxy:D) is rw
538
+
539
+ One of the attributes that can be set via C < .new > .
540
+ Defaults to C < ["\x0A", "\r\n"] >
541
+ Takes either a L < Str > or L < Array > of C < Str > specifying line ending(s) for this
542
+ handle. If C < .chomp > attribute is set to C < True > , will strip these endings
543
+ in routines that C < chomp > , such as L « C < get > |/routine/get» and
544
+ L « C < lines > |/routine/lines» .
545
+
546
+ = begin code :skip-test
547
+ with 'test'.IO {
548
+ .spurt: '1foo2bar3foo'; # write some data into our test file
549
+ my $fh will leave {.close} = .open; # can also set .nl-in via .open arg
550
+ $fh.nl-in = [<foo bar>]; # set two possible line endings to use;
551
+ $fh.lines.say; # OUTPUT: ("1", "2", "3").Seq
552
+ }
553
+ = end code
554
+
533
555
= head2 method opened
534
556
535
557
Defined as:
You can’t perform that action at this time.
0 commit comments