On 09/28/2017 09:32 PM, ToddAndMargo wrote:
Hi All,

I am creating a hash.  One of the keys I want to point to an array,
not a string.

I have created a test:

$ perl6 -e 'my %x = [aaa => "x", b=>@["y","q","r"], c=>"z"]; say %x; for @(%x<b>) {say $_};'
{aaa => x, b => [y q r], c => z}
y
q
r

This seems too easy.  I have to have done something wrong.
What did I miss?

-T


Way to easy.

$ perl6 -e 'my %x = [aaa => "x", b=>@["y","q","r"], c=>"z"]; push @(%x<b>), "eeee"; say %x; for @(%x<b>) {say $_};'
{aaa => x, b => [y q r eeee], c => z}
y
q
r
eeee


I am very suspicious.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to