πŸ“˜ Pair creation operator => in Perl 6

πŸ“˜ Pair creation operator => in Raku

N. B. Perl 6 has been renamed to Raku. Click to read more.


=> creates an object of the Pair type. The Pair is a β€œkey; value” combination, like those used in hashes. In the code, it is not always necessary to quote the key values.

my $pair = alpha => "one";Β 
my %data = jan => 31, feb => 28, mar => 31;

Leave a Reply

Your email address will not be published. Required fields are marked *

Retype the CAPTCHA code from the image
Change the CAPTCHA codeSpeak the CAPTCHA code