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

=> 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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s