in reply to Re: Re: setting hash keys by array
in thread setting hash keys by array

Nice stuff to both you and japhy

While trying to grok that code I stumbled on an interesting different approach... Its not suitable for building a tree from many lists, but is suitable for building a HOH out of a single list:

use Data::Dumper; my @keys = qw( this that those ); my $node='value'; $node={$_=>$node} foreach reverse @keys; print Dumper $node; __END__ $VAR1 = { 'this' => { 'that' => { 'those' => 'value' } } };

--- demerphq
my friends call me, usually because I'm late....