Course of Raku / Advanced /
Debugging / Debugging with dd / Exercises
Dump the data structure
Problem
You are given the following nested data structure:
my @data = 'Raku', [1, 2, 3], (key => 'value');Do two things with it:
- Print a developer-friendly dump of
@datausingdd. - Print the same representation as a string, prefixed with the text
Structure:.
Example
The program prints two similar lines:
["Raku", [1, 2, 3], :key("value")]
Structure: ["Raku", [1, 2, 3], :key("value")]Solution
Course navigation
← Dumping function signatures | Solution: Dump the data structure →