File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,25 @@ my $fh = open 'path/to/file', :w;
352
352
$fh.printf: "The value is %d\n", 32;
353
353
$fh.close;
354
354
355
+ = head2 method put
356
+
357
+ Defined as:
358
+
359
+ multi method put(**@text --> True)
360
+
361
+ Writes the given C < @text > to the handle, coercing any non-L < Str > objects
362
+ to L < Str > by calling L « C < .Str > |/routine/Str» method on them, and appending the
363
+ value of L « C < .nl-out > |/type/IO::Handle#method_nl-out» at the end.
364
+
365
+ Attempting to call this method when the handle is
366
+ L < in binary mode|/type/IO::Handle#method_encoding > will result in
367
+ C < X::IO::BinaryMode > exception being thrown.
368
+
369
+ = for code :skip-test
370
+ my $fh = 'path/to/file'.IO.open: :w;
371
+ $fh.print: 'some text';
372
+ $fh.close;
373
+
355
374
= head2 method say
356
375
357
376
Defined as:
You can’t perform that action at this time.
0 commit comments