A hash (also called associative array) is a set of key,value pairs where the keys are unique strings and the values can have any, err value.
Hashes always start with a % (percentage) sign.
examples/hash/create_hash.p6#!/usr/bin/env perl6
use v6;
my %user_a = "fname", "Foo", "lname", "Bar";
my %user_b =
"fname" => "Foo",
"lname" => "Bar",
;
say %user_a{"fname"};
%user_a{"email"} = "foo@bar.com";
say %user_a{"email"};
say %user_b<lname>;
Output
examples/hash/create_hash.p6.outFoo foo@bar.com Bar