Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use correct funcs and methods
  • Loading branch information
tbrowder committed Aug 23, 2016
1 parent 6e413b8 commit cf9680d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/Type/IO/Handle.pod6
Expand Up @@ -125,20 +125,20 @@ to a file. See L<sub sprintf|https://docs.perl6.org/type/Str#sub_sprintf> for d
the Perl 6 C<$format> implementation
Note that currently C<printf> is not a method for C<IO::Handle>, but
its effect may be duplicated with a work-around using C<sub sprintf>.
For example:
its effect may be duplicated with a work-around using C<sub sprintf>
and methods C<print> or C<say>. For example:
=for code :skip-test
my $fh = open 'path/to/file', :w;
$fh.say(printf("%d\n", 32));
$fh.print(sprintf("%d\n", 32));
$fh.close;
The C<say> method (see below) may be used for an automatic ending
newline:
=for code :skip-test
my $fh = open 'path/to/file', :w;
$fh.say(printf("%d\n", 32));
$fh.say(sprintf("%d", 32));
$fh.close;
See L<sub sprintf|https://docs.perl6.org/type/Str#sub_sprintf>
Expand Down

0 comments on commit cf9680d

Please sign in to comment.