I am trying to open a file for writing and use printf
to do formatting, but documentation and reality do not seem to agree. Am I missing something?
To exit type 'exit' or '^D'
> my $fh=open "test", :w;
IO::Handle<"test".IO>(opened, at octet 0)
> $fh.printf: "test";
No such method 'printf' for invocant of type 'IO::Handle'
in block <unit> at <unknown file> line 1
But my code seems okay according to documentation:
https://docs.perl6.org/routine/printf
Thank you very much !!