Re: Unknown level of hash

2005-03-29 Thread Markus Laire
Zhuang Li wrote: Yes. I think it's both useful and fun. I was thinking something similar to @[EMAIL PROTECTED] = map{1} @a; But getting $hash-{E1}-{E2}-...-{En} = 1; instead of $hash{E1} = 1; ... $hash{En} =1;. What I'd really like to do is: Given @a = ('E1', 'E2', ..., 'En'); @b =

Re: Unknown level of hash

2005-03-29 Thread Luke Palmer
Zhuang Li writes: Yes. I think it's both useful and fun. I was thinking something similar to @[EMAIL PROTECTED] = map{1} @a; But getting $hash-{E1}-{E2}-...-{En} = 1; instead of $hash{E1} = 1; ... $hash{En} =1;. Yeah, like this: %hash{dims @a} = (1) xx Inf; What I'd really like to

RE: Unknown level of hash

2005-03-29 Thread Zhuang Li
-Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 5:43 AM To: Zhuang Li Cc: Jeff Yoak; fwp@perl.org; perl6-language@perl.org Subject: Re: Unknown level of hash Zhuang Li writes: Yes. I think it's both useful and fun. I was thinking

Re: Unknown level of hash

2005-03-28 Thread Uri Guttman
ZL == Zhuang Li [EMAIL PROTECTED] writes: ZL Hi, given an array: @a = ('E1', 'E2', ..., 'En'); ZL Is there an easy way, hopefully one liner, to do the following without a ZL loop? If not, will Perl support this in Perl 6? ZL $hash-{E1}-{E2}-...-{En} = 1; i think perl6 plans to have a

RE: Unknown level of hash

2005-03-28 Thread Zhuang Li
To: Zhuang Li Cc: fwp@perl.org Subject: Re: Unknown level of hash On Mon, 2005-03-28 at 15:06, Zhuang Li wrote: Hi, given an array: @a = ('E1', 'E2', ..., 'En'); Is there an easy way, hopefully one liner, to do the following without a loop? If not, will Perl support this in Perl 6