Documentation for method nl-out

Documentation for method nl-out, assembled from the following types:

class Any

From Any

(Any) method nl-out

Defined As:

method nl-out(--> Str)

Returns Str with the value of "\n". See IO::Handle.nl-out for the details.

say Any.nl-out# OUTPUT: «␤␤» 

class IO::Handle

From IO::Handle

(IO::Handle) method nl-out

Defined as:

has Str:D $.nl-out is rw = "\n";

One of the attributes that can be set via .new or open. Defaults to "\n". Takes a Str specifying output line ending for this handle, to be used by methods .put and .say.

with 'test'.IO {
    given .open: :w {
        .put: 42;
        .nl-out = 'foo';
        .put: 42;
        .close;
    }
    .slurp.perl.say# OUTPUT: «"42\n42foo"» 
}

class IO::CatHandle

From IO::CatHandle

(IO::CatHandle) method nl-out

Defined as:

multi method nl-out(|)

In Rakudo, the IO::CatHandle type overrides this method to throw X::NYI exception. If you have a good idea for how this method should behave, tell Rakudo developers about it!