© J.J. Merelo 2019
J. MereloPerl 6 Quick Syntax Referencehttps://doi.org/10.1007/978-1-4842-4956-7_6

6. Processing Complex Data Structures

How to Transform Data in Many Different Ways
J. J. Merelo1 
(1)
Granada, Spain
 

Programming is about processing data, changing and synthesizing information in many different ways. And functions are applied directly to data, which is why we will not, for the time being, deal with any way of storing that data.

Perl 6 is also object-oriented and functional. The first means that a method will be applied to data, and the way to apply it is simply by appending a period to the data structure (which might be surrounded with parentheses for convenience) and putting the name of the method behind, like so:
%( Óðinn => "Gungnir", ...

Get Perl 6 Quick Syntax Reference: A Pocket Guide to the Language, the Core Modules, and the Community now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.