txt: ## nl-in.md
  nl-in
  
  Combined from primary sources listed below.
  
  # [In IO::Handle](#___top "go to top of document")[§](#(IO::Handle)_method_nl-in "direct link")
  
  See primary documentation
  [in context](/type/IO/Handle#method_nl-in)
  for **method nl-in**.
  
  ```raku
  method nl-in(--> Str:D) is rw
  ```
  
  One of the attributes that can be set via `.new` or [open](/routine/open). Defaults to `["\x0A", "\r\n"]`. Takes either a [`Str`](/type/Str) or [`Array`](/type/Array) of [`Str`](/type/Str) specifying input line ending(s) for this handle. If `.chomp` attribute is set to `True`, will strip these endings in routines that `chomp`, such as [`get`](/routine/get) and [`lines`](/routine/lines).
  
  ```raku
  with 'test'.IO {
      .spurt: '1foo2bar3foo'; # write some data into our test file
      my $fh will leave {.close} = .open; # can also set .nl-in via .open arg
      $fh.nl-in = [<foo bar>]; # set two possible line endings to use;
      $fh.lines.say; # OUTPUT: ("1", "2", "3").Seq
  }
  
  ```
  
  # [In IO::CatHandle](#___top "go to top of document")[§](#(IO::CatHandle)_method_nl-in "direct link")
  
  See primary documentation
  [in context](/type/IO/CatHandle#method_nl-in)
  for **method nl-in**.
  
  ```raku
  method nl-in(IO::CatHandle:D:) is rw
  ```
  
  Sets the invocant's `$.nl-in` attribute to the assigned value, which can be a [`Str`](/type/Str) or a [`List`](/type/List) of [`Str`](/type/Str), where each [`Str`](/type/Str) object represents the end-of-line string. All source handles, including the active one will use the provided `$.nl-in` value. Note that source handle boundary is always counted as a new line break.
  
  ```raku
  (my $f1 = 'foo'.IO).spurt: "A\nB\nC";
  (my $f2 = 'bar'.IO).spurt: "DxEx";
  with IO::CatHandle.new: $f1, $f2 {
      # .nl-in is ["\n", "\r\n"] by default:
      (.get xx 2).raku.say; # OUTPUT: «("A", "B").Seq␤»
  
      .nl-in = 'x';
      (.get xx 3).raku.say; # OUTPUT: «("C", "D", "E").Seq␤»
      .close
  }
  
  ```
  