Course of Raku / Objects, I/O, and exceptions / Input and output / Working with files / Exercises

Count the characters

Problem

Write the string Raku to a file called data.txt. Then read the file back and print the number of characters it contains.

Example

The program prints:

4

Solution

See the solution

Course navigation

Solution: Build up a log   |   Solution: Count the characters