September 2017
Beginner
402 pages
9h 52m
English
The => operator creates pairs. It takes the left operand as the key and the right operand as the value.
my $pair = 'key' => 'value';
The type of the created object is Pair.
With the => operator, the key may not be quoted if it passes the restrictions for identifiers in Perl 6. Consider the following example:
my $pair1 = alpha => 1;my $pair2 = beta => 2;