Course of Raku / Essentials / Positional data types / Exercises

The number of command-line arguments

Task

Write a program that prints the number of arguments passed to the program in the command line.

Example

This is how the program is supposed to react:

$ raku number-of-command-line-arguments.raku make them count us now
5

The program gets five words in the command line and prints 5.

Solution

See the solution

Next exercise

💪 Print command-line arguments

Course navigation

Typed variables / Allomorphs   |   Associative data types