Course of Raku / Essentials / Positional data types / Exercises

Count and print command-line arguments

Task

Write a program that reads an arbitrary number of arguments from the command line and prints them on separate, numbered lines.

Example

The expected behaviour of the program:

$ raku count-and-print-arguments.raku words to display
1. words
2. to
3. display

Solution

See the solution

Next exercise

💪 Months names

Course navigation

Typed variables / Allomorphs   |   Associative data types

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська