Re: how do I assign an array to a hash key

2017-09-28 Thread ToddAndMargo
On 09/28/2017 09:47 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 12:44 AM, ToddAndMargo > wrote: I will probably use the @ for a while until I get use to it for readability. I think that's actually disrecommended, because it

Re: how do I assign an array to a hash key

2017-09-28 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 12:44 AM, ToddAndMargo wrote: > I will probably use the @ for a while until I get use to > it for readability. > I think that's actually disrecommended, because it looks too much like Perl 5's refs but isn't, so it can bite you unexpectedly if you

Re: how do I assign an array to a hash key

2017-09-28 Thread ToddAndMargo
On 09/28/2017 09:43 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 12:32 AM, ToddAndMargo > wrote: $ perl6 -e 'my %x = [aaa => "x", b=>@["y","q","r"], c=>"z"]; say %x; for @(%x) {say $_};' {aaa => x, b => [y q r], c => z}

Re: how do I assign an array to a hash key

2017-09-28 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 12:32 AM, ToddAndMargo wrote: > $ perl6 -e 'my %x = [aaa => "x", b=>@["y","q","r"], c=>"z"]; say %x; for > @(%x) {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

Re: how do I assign an array to a hash key

2017-09-28 Thread ToddAndMargo
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) {say $_};' {aaa => x, b => [y q r], c => z} y q r This

how do I assign an array to a hash key

2017-09-28 Thread ToddAndMargo
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) {say $_};' {aaa => x, b => [y q r], c => z} y q r This seems too easy. I have to have done