use Data::Dumper; ## japhy's solution, with a style contribution from Juerd my @keys = qw( this that those ); my $node = \\my %hash; $node = \$$node->{$_} for @keys; $$node = 'value'; print Dumper(\%hash); __output__ $VAR1 = { 'this' => { 'that' => { 'those' => 'value' } } };
_________
broquaint
In reply to Re: Populating hash keys
by broquaint
in thread Populating hash keys
by dda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |