Unknown level of hash

[email protected] ("Zhuang Li")
Newsgroups perl.fwp
Message-ID <7A7034183C845E4B9963F65505BA34D121939B@vchqex01.wl.corp.valueclick.com>
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?

 

$hash->{E1}->{E2}->...->{En} = 1;

 

 

Thanks,

 

john
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.